|
@@ -4,8 +4,8 @@ from .apiviews import *
|
|
from rest_framework import routers
|
|
from rest_framework import routers
|
|
from django_spaghetti.views import Plate
|
|
from django_spaghetti.views import Plate
|
|
from schema_graph.views import Schema
|
|
from schema_graph.views import Schema
|
|
|
|
+from django.conf import settings
|
|
from django.contrib.auth.decorators import login_required
|
|
from django.contrib.auth.decorators import login_required
|
|
-from core.config import DEBUG
|
|
|
|
|
|
|
|
router = routers.SimpleRouter()
|
|
router = routers.SimpleRouter()
|
|
router.register(r'sharix-users', SharixUserMVS)
|
|
router.register(r'sharix-users', SharixUserMVS)
|
|
@@ -47,20 +47,18 @@ urlpatterns = [
|
|
|
|
|
|
path('partner_information/add/', login_required(PartnerInformationCreate.as_view()), name='partner_information/add/'),
|
|
path('partner_information/add/', login_required(PartnerInformationCreate.as_view()), name='partner_information/add/'),
|
|
path('partner_information/edit/<int:pk>', login_required(PartnerInformationUpdateView.as_view()), name='partner_information/edit/'),
|
|
path('partner_information/edit/<int:pk>', login_required(PartnerInformationUpdateView.as_view()), name='partner_information/edit/'),
|
|
- #path('v1/auth/', include('djoser.urls'), name='auth-reg'),
|
|
|
|
|
|
|
|
path('user_information', login_required(UserListView.as_view()), name='user_information'),
|
|
path('user_information', login_required(UserListView.as_view()), name='user_information'),
|
|
|
|
|
|
- #path('v1/auth/', include('djoser.urls')),
|
|
|
|
- path('auth/', include('djoser.urls.authtoken'), name='auth'),
|
|
|
|
- path('platform/api/', include(router.urls), name="sharix-api"),
|
|
|
|
|
|
+ path('api/v1/auth/', include('djoser.urls.authtoken'), name="api-auth"),
|
|
|
|
+ path('api/v1/platform/', include(router.urls), name="api-platform"),
|
|
|
|
+
|
|
path('senderphone/', PhoneSender.as_view()),
|
|
path('senderphone/', PhoneSender.as_view()),
|
|
|
|
+
|
|
#schemas
|
|
#schemas
|
|
path('schemav1/', login_required(Schema.as_view()), name='schemav1'),
|
|
path('schemav1/', login_required(Schema.as_view()), name='schemav1'),
|
|
path('schemav2/', login_required(Plate.as_view()), name='schemav2'),
|
|
path('schemav2/', login_required(Plate.as_view()), name='schemav2'),
|
|
path('schemav3/', schema_v3, name='schema'),
|
|
path('schemav3/', schema_v3, name='schema'),
|
|
|
|
|
|
re_path(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
|
re_path(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
|
-]
|
|
|
|
-if DEBUG:
|
|
|
|
- urlpatterns += path('v1/auth/', include('djoser.urls')),
|
|
|
|
|
|
+]
|