from django.urls import path, include, re_path from SharixAdmin.views import * from .apiviews import * from rest_framework import routers from django_spaghetti.views import Plate from schema_graph.views import Schema from django.conf import settings from django.contrib.auth.decorators import login_required from django.conf.urls.static import static router = routers.SimpleRouter() router.register(r'sharix-users', SharixUserMVS) router.register(r'group', GroupMVS) urlpatterns = [ path('', login_required(IndexView.as_view()), name='home'), path('transactions/', login_required(TransactionsView.as_view()), name='transactions'), path('payment/', login_required(PaymentView.as_view()), name='payment'), # Страница "Сотрудничество" (запрос на подключение к сервису) path('cooperate/', login_required(CooperateView.as_view()), name='cooperate'), # Страница "О партнере" path('partner/', login_required(PartnerDetailView.as_view()), name='partner_detail'), path('partner/edit/', login_required(PartnerEditView.as_view()), name='partner_edit'), path('accounts/login/', LoginSharix.as_view(), name='authweb'), path('transactions//', trans_id, name='transid'), path('logout/', logout_view, name='logoutweb'), path('balance/', balance, name='balance'), path('payment/', login_required(paymentView), name='payment'), path('payment_way/', login_required(paymentWayView), name='payment_way'), path('account/', login_required(AccountView), name='account'), path('account/delete//', login_required(AccountDelete.as_view()), name='account/delete/'), path('account/edit//', login_required(AccountUpdateView.as_view()), name='account/edit/'), path('task_management/', login_required(TaskListView.as_view()), name='task_management'), path('comments/', login_required(CommentsListView.as_view()), name='comments'), path('comments/change_status/', change_comments_status, name='comments/change_status'), path('comments/delete/', login_required(CommentsDelete.as_view()), name='comments/delete/'), path('tech_support/', login_required(TechListView.as_view()), name='tech_support'), path('tech_support/edit/', login_required(CommentsUpdateView.as_view()), name='tech_support/edit/'), path('tech_support/add/', login_required(CommentsCreate.as_view()), name='tech_support/add/'), path('tech_support/delete/', login_required(TechSupDelete.as_view()), name='tech_support/delete/'), path('partners/', login_required(PartnersListView.as_view()), name='partners'), path('partners/change_status/', change_partners_status, name='partners/change_status'), path('resource/', login_required(ResourceListView.as_view()), name='resource'), path('resource/change_status/', change_resource_status, name='resource/change_status'), path('provider/', login_required(ProviderListView.as_view()), name='provider'), path('provider/change_status/', change_provider_status, name='provider/change_status'), path('service_tariff/', login_required(ServiceTariffListView.as_view()), name='service_tariff'), path('service_tariff/add/', login_required(ServiceTariffCreate.as_view()), name='service_tariff/add/'), path('service_tariff/edit/', login_required(ServiceTariffUpdateView.as_view()), name='service_tariff/edit/'), path('service_type/', login_required(ServiceTypeListView.as_view()), name='service_type'), path('service_type/edit/', login_required(ServiceTypeUpdateView.as_view()), name='service_type/edit/'), path('service_type/add/', login_required(ServiceTypeCreate.as_view()), name='service_type/add/'), path('service_type/delete/', login_required(ServiceTypeDelete.as_view()), name='service_type/delete/'), # path('service_information/add/', login_required(ServiceInformationCreate.as_view()), name='service_information-add'), path('service_information/edit/', login_required(ServiceInformationUpdateView.as_view()), name='service_information/edit/'), path('service/', ServiceListView.as_view(), name='service'), path('service/change_status/', change_service_status, name='service/change_status'), #path('partner_information/', login_required(PartnerInfoView.as_view()), name='partner_information/'), #path('partner_information/add/', login_required(PartnerInformationCreate.as_view()), name='partner_information/add/'), #path('partner_information/edit/', login_required(PartnerInformationUpdateView.as_view()), name='partner_information/edit/'), path('user_information', login_required(UserListView.as_view()), name='user_information'), path('user_information/delete/', login_required(UserDelete.as_view()), name='user_information/delete/'), 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()), #schemas path('schemav1/', login_required(Schema.as_view()), name='schemav1'), path('schemav2/', login_required(Plate.as_view()), name='schemav2'), path('schemav3/', schema_v3, name='schema'), re_path(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)