95 lines
2.2 KiB
Python
95 lines
2.2 KiB
Python
from django.conf import settings
|
|
from django.conf.urls.i18n import i18n_patterns
|
|
from django.contrib import admin
|
|
from django.urls import include, path
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
from drf_spectacular.views import SpectacularAPIView
|
|
|
|
from engine.core.graphene.schema import schema
|
|
from engine.core.views import (
|
|
CustomGraphQLView,
|
|
CustomRedocView,
|
|
CustomSwaggerView,
|
|
favicon_view,
|
|
index,
|
|
)
|
|
|
|
urlpatterns = [
|
|
### COMMON URLS ###
|
|
path(
|
|
r"",
|
|
index,
|
|
),
|
|
path(
|
|
r"health/",
|
|
include(
|
|
"health_check.urls",
|
|
),
|
|
),
|
|
path(
|
|
r"prometheus/",
|
|
include(
|
|
"django_prometheus.urls",
|
|
),
|
|
),
|
|
path(
|
|
"summernote/",
|
|
include("django_summernote.urls"),
|
|
),
|
|
path(
|
|
r"i18n/",
|
|
include("django.conf.urls.i18n"),
|
|
),
|
|
path(
|
|
r"favicon.ico",
|
|
favicon_view,
|
|
),
|
|
path(
|
|
r"graphql/",
|
|
csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema)),
|
|
name="graphql-platform",
|
|
),
|
|
### DOCUMENTATION URLS ###
|
|
path(
|
|
r"docs/",
|
|
SpectacularAPIView.as_view(urlconf="evibes.urls", custom_settings=settings.SPECTACULAR_SETTINGS),
|
|
name="schema-platform",
|
|
),
|
|
path(
|
|
r"docs/swagger/",
|
|
CustomSwaggerView.as_view(url_name="schema-platform"),
|
|
name="swagger-ui-platform",
|
|
),
|
|
path(
|
|
r"docs/redoc/",
|
|
CustomRedocView.as_view(url_name="schema-platform"),
|
|
name="redoc-ui-platform",
|
|
),
|
|
### ENGINE APPS URLS ###
|
|
path(
|
|
r"b2b/",
|
|
include("engine.core.b2b_urls", namespace="core_b2b"),
|
|
),
|
|
path(
|
|
r"",
|
|
include("engine.core.urls", namespace="core"),
|
|
),
|
|
path(
|
|
r"authv/",
|
|
include("engine.authv.urls", namespace="authv"),
|
|
),
|
|
path(
|
|
r"payments/",
|
|
include("engine.payments.urls", namespace="payments"),
|
|
),
|
|
path(
|
|
r"blog/",
|
|
include("engine.blog.urls", namespace="blog"),
|
|
),
|
|
### ADMIN URLS ###
|
|
path(
|
|
"admin/doc/",
|
|
include("django.contrib.admindocs.urls"),
|
|
),
|
|
*i18n_patterns(path("admin/", admin.site.urls)),
|
|
]
|