36 lines
979 B
Python
36 lines
979 B
Python
"""
|
|
All urls configurations tree
|
|
"""
|
|
|
|
from django.conf import settings
|
|
from django.contrib import admin
|
|
from django.http import HttpResponse
|
|
from django.urls import include, path, re_path
|
|
from django.views.static import serve
|
|
|
|
from config.env import env
|
|
|
|
def home(request):
|
|
return HttpResponse("OK")
|
|
|
|
|
|
urlpatterns = [
|
|
path("health/", home),
|
|
path("", include("core.apps.accounts.urls")),
|
|
path("", include("core.apps.shared.urls")),
|
|
path("", include("core.apps.management.urls")),
|
|
]
|
|
urlpatterns += [
|
|
path("admin/", admin.site.urls),
|
|
# path("accounts/", include("django.contrib.auth.urls")),
|
|
path("i18n/", include("django.conf.urls.i18n")),
|
|
]
|
|
if env.bool("SILK_ENABLED", False):
|
|
urlpatterns += []
|
|
if env.str("PROJECT_ENV") == "debug":
|
|
urlpatterns += [
|
|
]
|
|
urlpatterns += [
|
|
re_path("static/(?P<path>.*)", serve, {"document_root": settings.STATIC_ROOT}),
|
|
re_path("media/(?P<path>.*)", serve, {"document_root": settings.MEDIA_ROOT}),
|
|
] |