27 lines
1.1 KiB
Python
Executable File
27 lines
1.1 KiB
Python
Executable File
from django.conf import settings
|
|
from django.urls import include, path
|
|
from apps.develop.views import (BackupDatabase, BackupMedia, ReloadClientGit,
|
|
ReloadServerGit, ReloadServerOnly, TestViewSet, CorrectViewSet, testScanHtml, ServerTime)
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
API_BASE_URL = 'api/develop/'
|
|
HTML_BASE_URL = 'dhtml/develop/'
|
|
router = DefaultRouter()
|
|
router.register('correct', CorrectViewSet, basename='correct')
|
|
|
|
if settings.DEBUG:
|
|
router.register('test', TestViewSet, basename='api_test')
|
|
|
|
urlpatterns = [
|
|
path(API_BASE_URL + 'reload_server_git/', ReloadServerGit.as_view()),
|
|
# path(API_BASE_URL + 'reload_web_git/', ReloadClientGit.as_view()),
|
|
path(API_BASE_URL + 'reload_server_only/', ReloadServerOnly.as_view()),
|
|
path(API_BASE_URL + 'backup_database/', BackupDatabase.as_view()),
|
|
path(API_BASE_URL + 'backup_media/', BackupMedia.as_view()),
|
|
path(API_BASE_URL + 'server_time/', ServerTime.as_view()),
|
|
path(API_BASE_URL, include(router.urls)),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns.append(path(HTML_BASE_URL + "testscan/", testScanHtml))
|