1234567891011121314151617181920212223242526272829303132333435363738 |
- from django.contrib import admin
- from django.conf import settings
- from django.urls import path, include, re_path
- from django.views.generic.base import TemplateView
- from django.contrib.staticfiles.views import serve
- from django.views.static import serve as static_serve
- from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
- from . import views
- def return_static(request, path, insecure=True, **kwargs):
- return serve(request, path, insecure, **kwargs)
- urlpatterns = [
-
- path('login/', include('userlogin.urls')),
- path('register/', include('userregister.urls')),
- path('user/', include('userprofile.urls')),
- path('groupMeeting/',include ('groupMeeting.urls')),
- path('invoice/', include('invoice.urls')),
- re_path(r'^favicon\.ico$', views.favicon, name='favicon'),
- re_path('^css/.*$', views.css, name='css'),
- re_path('^js/.*$', views.js, name='js'),
- re_path('^statics/.*$', views.statics, name='statics'),
- re_path('^fonts/.*$', views.fonts, name='fonts'),
- re_path(r'^robots.txt', views.robots, name='robots'),
- re_path(r'^media/(?P<path>.*)$', static_serve, {'document_root': settings.MEDIA_ROOT}),
- re_path(r'^static/(?P<path>.*)$', return_static, name='static')
- ]
- urlpatterns += [
- path('api/', SpectacularAPIView.as_view(), name='schema'),
- # Optional UI:
- path('api/debug/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
- path('api/docs/', SpectacularRedocView.as_view(url_name='schema'), name='docs'),
- ]
|