gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
56
routes/common.py
Executable file
56
routes/common.py
Executable file
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
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 routes.swagger import schema_view
|
||||
|
||||
|
||||
def health(request):
|
||||
return HttpResponse("OK: #e300e79ae3e5dbce142672f917cc1ff664810d8c")
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path("health/", health),
|
||||
path("admin/", admin.site.urls),
|
||||
path("rosetta/", include("rosetta.urls")),
|
||||
path("accounts/", include("django.contrib.auth.urls")),
|
||||
path(
|
||||
"ckeditor5/",
|
||||
include("django_ckeditor_5.urls"),
|
||||
name="ck_editor_5_upload_file",
|
||||
), # noqa
|
||||
path("i18n/", include("django.conf.urls.i18n")),
|
||||
# Internal apps
|
||||
path("api/", include("core.apps.accounts.urls")),
|
||||
path("", include("core.apps.home.urls")),
|
||||
path("api/", include("core.apps.eggs.urls")),
|
||||
# Media and static files
|
||||
re_path(
|
||||
r"static/(?P<path>.*)", serve, {"document_root": settings.STATIC_ROOT}
|
||||
), # noqa
|
||||
re_path(
|
||||
r"media/(?P<path>.*)", serve, {"document_root": settings.MEDIA_ROOT}
|
||||
), # noqa
|
||||
# Swagger urls
|
||||
path(
|
||||
"swagger<format>/",
|
||||
schema_view.without_ui(cache_timeout=120),
|
||||
name="schema-json",
|
||||
), # noqa
|
||||
path(
|
||||
"swagger/",
|
||||
schema_view.with_ui("swagger", cache_timeout=120),
|
||||
name="schema-swagger-ui",
|
||||
), # noqa
|
||||
path(
|
||||
"redoc/",
|
||||
schema_view.with_ui("redoc", cache_timeout=120),
|
||||
name="schema-redoc",
|
||||
), # noqa
|
||||
]
|
||||
Reference in New Issue
Block a user