from django.conf import settings from django.contrib.staticfiles.views import serve as serve_static from django.urls import path, re_path from core import views urlpatterns = [ path("", views.home, name="home"), path("health/", views.health, name="health"), path("transactions/", views.transaction_list, name="transaction-list"), path("transactions/new/", views.transaction_create, name="transaction-create"), path("transactions//", views.transaction_detail, name="transaction-detail"), path("transactions//annotate/", views.transaction_annotate, name="transaction-annotate"), path("accounts/", views.account_list, name="account-list"), path("accounts/new/", views.account_create, name="account-create"), path("accounts//archive/", views.account_archive, name="account-archive"), path("categories/", views.category_list, name="category-list"), path("categories/new/", views.category_create, name="category-create"), path("categories//archive/", views.category_archive, name="category-archive"), path("payees/", views.payee_list, name="payee-list"), path("payees/new/", views.payee_create, name="payee-create"), path("payees//archive/", views.payee_archive, name="payee-archive"), ] if settings.LOCAL_SERVE_STATIC: urlpatterns.append( re_path(r"^static/(?P.*)$", serve_static, {"insecure": True}, name="local-static") )