first commit
This commit is contained in:
36
config/urls.py
Normal file
36
config/urls.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
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}),
|
||||
]
|
||||
Reference in New Issue
Block a user