mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-08 11:05:17 +00:00
Move api urls to api app
This commit is contained in:
parent
ae7784a973
commit
50d7b7e731
10
api/urls.py
Normal file
10
api/urls.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from ninja_extra import NinjaExtraAPI
|
||||||
|
|
||||||
|
api = NinjaExtraAPI(
|
||||||
|
title="PICON",
|
||||||
|
description="Portail Interaction de Communication avec les Services Étudiants",
|
||||||
|
version="0.2.0",
|
||||||
|
urls_namespace="api",
|
||||||
|
csrf=True,
|
||||||
|
)
|
||||||
|
api.auto_discover_controllers()
|
@ -18,15 +18,14 @@ from django.contrib import admin
|
|||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
from django.views.i18n import JavaScriptCatalog
|
from django.views.i18n import JavaScriptCatalog
|
||||||
from ninja_extra import NinjaExtraAPI
|
|
||||||
|
from api.urls import api
|
||||||
|
|
||||||
js_info_dict = {"packages": ("sith",)}
|
js_info_dict = {"packages": ("sith",)}
|
||||||
|
|
||||||
handler403 = "core.views.forbidden"
|
handler403 = "core.views.forbidden"
|
||||||
handler404 = "core.views.not_found"
|
handler404 = "core.views.not_found"
|
||||||
handler500 = "core.views.internal_servor_error"
|
handler500 = "core.views.internal_servor_error"
|
||||||
api = NinjaExtraAPI(title="Sith API", version="0.2.0", urls_namespace="api", csrf=True)
|
|
||||||
api.auto_discover_controllers()
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", include(("core.urls", "core"), namespace="core")),
|
path("", include(("core.urls", "core"), namespace="core")),
|
||||||
|
@ -11,7 +11,7 @@ import rjsmin
|
|||||||
import sass
|
import sass
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from sith.urls import api
|
from api.urls import api
|
||||||
from staticfiles.apps import BUNDLED_FOLDER_NAME, BUNDLED_ROOT, GENERATED_ROOT
|
from staticfiles.apps import BUNDLED_FOLDER_NAME, BUNDLED_ROOT, GENERATED_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user