@ -20,6 +20,7 @@ import django.db.models.options as options
|
||||
|
||||
options.DEFAULT_NAMES = (*options.DEFAULT_NAMES, 'sub_model_type', 'itam_sub_model_type')
|
||||
|
||||
APPEND_SLASH = False
|
||||
AUTH_USER_MODEL = 'auth.User'
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
|
@ -4,14 +4,14 @@ from django.contrib.auth import views as auth_views
|
||||
from django.views.static import serve
|
||||
from django.urls import include, path, re_path
|
||||
|
||||
|
||||
from rest_framework import urls
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls, name='_administration'),
|
||||
path('admin', admin.site.urls, name='_administration'),
|
||||
|
||||
path('account/password_change/', auth_views.PasswordChangeView.as_view(template_name="password_change.html.j2"), name="change_password"),
|
||||
path('account/password_change', auth_views.PasswordChangeView.as_view(template_name="password_change.html.j2"), name="change_password"),
|
||||
|
||||
path("account/", include("django.contrib.auth.urls")),
|
||||
path("account", include("django.contrib.auth.urls")),
|
||||
|
||||
re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
|
||||
|
||||
@ -30,15 +30,16 @@ if settings.API_ENABLED:
|
||||
|
||||
urlpatterns += [
|
||||
|
||||
path("api/", include("api.urls", namespace = 'v1')),
|
||||
path("api", include("api.urls", namespace = 'v1')),
|
||||
|
||||
path("api/v2/", include("api.urls_v2", namespace = 'v2')),
|
||||
path("api/v2", include("api.urls_v2", namespace = 'v2')),
|
||||
|
||||
]
|
||||
|
||||
|
||||
urlpatterns += [
|
||||
path('api/v2/auth/', include('rest_framework.urls')),
|
||||
path('api/v2/auth/login', auth_views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
|
||||
path('api/v2/auth/logout', auth_views.LogoutView.as_view(), name='logout'),
|
||||
]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user