1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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('admin/', admin.site.urls),
- path('', TemplateView.as_view(template_name='dist/spa/index.html')),
- path('myip/', views.myip, name='myip'),
-
- path('staff/', include('staff.urls')),
-
- path('login/', include('userlogin.urls')),
- path('register/', include('userregister.urls')),
- path('stock/', include('stock.urls')),
- path('warehouse/', include('warehouse.urls')),
- path('reportcenter/', include('reportcenter.urls')),
- # path('asn/', include('asn.urls')),
- path('bound/', include('bound.urls')),
- path('container/', include('container.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')
- ]
|