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.*)$', static_serve, {'document_root': settings.MEDIA_ROOT}), re_path(r'^static/(?P.*)$', 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'), ]