urls.py 1.2 KB

123456789101112131415161718192021222324252627282930
  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('v1/auth/', include('djoser.urls')),
  21. path('auth/', include('djoser.urls.authtoken'), name='auth'),
  22. path('api/', include(router.urls)),
  23. path('senderphone/', PhoneSender.as_view()),
  24. #schemas
  25. path('schemav1/', login_required(Schema.as_view()), name='schemav1'),
  26. path('schemav2/', login_required(Plate.as_view()), name='schemav2'),
  27. path('schemav3/', schema_v3, name='schema'),
  28. ]