52 lines
3.1 KiB
Python
52 lines
3.1 KiB
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.contrib.auth import views as auth_views
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from users.views import AgencyCreateView, registerNewAgency
|
|
from . import views
|
|
from .views import GetCryptFile, GetCryptFileRecover
|
|
from django.contrib.auth.decorators import login_required
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
from django_encrypted_filefield.constants import FETCH_URL_NAME
|
|
from django.conf.urls import url
|
|
|
|
|
|
urlpatterns = [
|
|
path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'),
|
|
path('', include('users.urls'), name="dashboard-first"),
|
|
path('admin/', admin.site.urls),
|
|
path('dasettings/', include('dasettings.urls'), name="dasettings"),
|
|
path('messages/', include('message.urls'), name="messages"),
|
|
path('dashboard/', include('users.urls'), name="dashboard"),
|
|
path('areas/', include('areas.urls'), name="areas-management"),
|
|
path('tasks/', include('tasks.urls'), name="tasks-management"),
|
|
path('organizer/', include('organizer.urls'), name="ql-management"),
|
|
path('cloud/', include('cloud.urls'), name="cloud-main"),
|
|
path('standards/', include('standards.urls'), name="standards"),
|
|
path('rd/', include('recoverdir.urls'), name="recoverdir"),
|
|
path('news/', include('news.urls'), name="dashboard"),
|
|
path('orga/', include('orga.urls'), name="orga"),
|
|
path('password-reset/', auth_views.PasswordResetView.as_view(template_name='users/password_reset.html', html_email_template_name='users/password_reset_mail.html'), name='password-reset'),
|
|
path('password-reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='users/password_reset_done.html'), name='password_reset_done'),
|
|
path('password-reset-confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='users/password_reset_confirm.html'), name='password_reset_confirm'),
|
|
path('password-reset-complete/', auth_views.PasswordResetCompleteView.as_view(template_name='users/password_reset_complete.html'), name='password_reset_complete'),
|
|
path('register/', registerNewAgency, name='register'),
|
|
path('register/done', views.registerdone, name='register-done'),
|
|
path('summernote/', include('django_summernote.urls')),
|
|
path('notifications/', include('notificsys.urls'), name="notifications"),
|
|
path('tm/', include('timemanagement.urls'), name="timemanagement"),
|
|
path('api/', include('api.urls', namespace='api')),
|
|
path('chat/', include('chat.urls'), name='chat'),
|
|
path('api-token-auth/', obtain_auth_token, name='api-token-auth'),
|
|
path('getdoc/<path:path>/<int:agpk>', GetCryptFileRecover.as_view(), name=FETCH_URL_NAME),
|
|
path('getdoc/<path:path>', GetCryptFile.as_view(), name=FETCH_URL_NAME),
|
|
|
|
|
|
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
|
|
# ERROR HANDLERS
|
|
handler404 = 'users.views.handler404'
|
|
handler500 = 'users.views.handler500' |