urls.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from django.urls import path, include, re_path
  2. from .views import *
  3. from .apiviews import *
  4. from rest_framework import routers
  5. from django_spaghetti.views import Plate
  6. from schema_graph.views import Schema
  7. from django.contrib.auth.decorators import login_required
  8. router = routers.SimpleRouter()
  9. router.register(r'sharix-users', SharixUserMVS)
  10. router.register(r'group', GroupMVS)
  11. urlpatterns = [
  12. #path('auth/', LoginSharix.as_view(), name='auth'),
  13. path('accounts/login/', LoginSharix.as_view(), name='authweb'),
  14. path('', index, name='home'),
  15. path('transactions/', transactions, name='trans'),
  16. path('transactions/<int:trans_id>/', trans_id, name='transid'),
  17. path('logout/', logout_view, name='logoutweb'),
  18. path('balance/', balance, name='balance'),
  19. path('test/', testPage, name='test-page'),
  20. path('service/', ServiceListView.as_view(), name='service'),
  21. path('service/change_status/', change_service_status, name='service/change_status'),
  22. path('partner_information/add/', login_required(PartnerInformationCreate.as_view()), name='partner_information/add/'),
  23. path('partner_information/edit/<int:pk>', login_required(PartnerInformationUpdateView.as_view()), name='partner_information/edit/'),
  24. #path('v1/auth/', include('djoser.urls')),
  25. path('auth/', include('djoser.urls.authtoken'), name='auth'),
  26. path('platform/api/', include(router.urls), name="sharix-api"),
  27. path('senderphone/', PhoneSender.as_view()),
  28. #schemas
  29. path('schemav1/', login_required(Schema.as_view()), name='schemav1'),
  30. path('schemav2/', login_required(Plate.as_view()), name='schemav2'),
  31. path('schemav3/', schema_v3, name='schema'),
  32. re_path(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
  33. ]