Skip to content

Commit

Permalink
Add dashboard app url
Browse files Browse the repository at this point in the history
  • Loading branch information
henhuy committed Sep 5, 2023
1 parent dcb7051 commit 556192c
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,12 @@
from django.contrib import admin
from django.urls import include, path
from django.views import defaults as default_views
from django.views.generic import TemplateView
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
from rest_framework.authtoken.views import obtain_auth_token

urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
path("about/", TemplateView.as_view(template_name="pages/about.html"), name="about"),
# Django Admin, use {% url 'admin:index' %}
path("", include("django_comparison_dashboard.urls")),
path(settings.ADMIN_URL, admin.site.urls),
# User management
path("users/", include("sedos_dashboard.users.urls", namespace="users")),
path("accounts/", include("allauth.urls")),
# Your stuff: custom urls includes go here
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# API URLS
urlpatterns += [
# API base url
path("api/", include("config.api_router")),
# DRF auth token
path("auth-token/", obtain_auth_token),
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
path(
"api/docs/",
SpectacularSwaggerView.as_view(url_name="api-schema"),
name="api-docs",
),
]

if settings.DEBUG:
# This allows the error pages to be debugged during development, just visit
Expand Down

0 comments on commit 556192c

Please sign in to comment.