コード例 #1
0
from django.conf.urls import url

from api_test.api import ApiDoc, automationCase as Case, member, dynamic, user
from api_test.api import automationReport as Report
from api_test.api.global_parameter import HostTotal, AddHost, UpdateHost, DelHost, DisableHost, EnableHost
from api_test.api.projectList import ProjectList, AddProject, DelProject, \
    EnableProject, UpdateProject, DisableProject
from api_test.api.projectTitle import ProjectInfo

urlpatterns = [
    url(r'project/project_list', ProjectList.as_view()),
    url(r'project/add_project', AddProject.as_view()),
    url(r'project/update_project', UpdateProject.as_view()),
    url(r'project/del_project', DelProject.as_view()),
    url(r'project/disable_project', DisableProject.as_view()),
    url(r'project/enable_project', EnableProject.as_view()),
    url(r'title/project_info', ProjectInfo.as_view()),
    url(r'global/host_total', HostTotal.as_view()),
    url(r'global/add_host', AddHost.as_view()),
    url(r'global/update_host', UpdateHost.as_view()),
    url(r'global/del_host', DelHost.as_view()),
    url(r'global/disable_host', DisableHost.as_view()),
    url(r'global/enable_host', EnableHost.as_view()),
    url(r'api/group', ApiDoc.Group.as_view()),
    url(r'api/add_group', ApiDoc.AddGroup.as_view()),
    url(r'api/update_name_group', ApiDoc.UpdateNameGroup.as_view()),
    url(r'api/del_group', ApiDoc.DelGroup.as_view()),
    url(r'api/api_list', ApiDoc.ApiList.as_view()),
    url(r'api/add_api', ApiDoc.AddApi.as_view()),
    url(r'api/updateMock', ApiDoc.UpdateApiMockStatus.as_view()),
    url(r'api/lead_swagger', ApiDoc.LeadSwagger.as_view()),
コード例 #2
0
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from api_test.api.projectList import ProjectList, AddProject, DelProject
from api_test.api.caseList import AddCase, GetCase, DelCase
from api_test.api import user

urlpatterns = [
    path('admin/', admin.site.urls),
    path('project/project_list', ProjectList.as_view()),
    path('user/login', user.obtain_auth_token),
    path('project/get', ProjectList.as_view()),
    path('project/add', AddProject.as_view()),
    path('project/del', DelProject.as_view()),
    path('case/add', AddCase.as_view()),
    path('case/get', GetCase.as_view()),
    path('api/del', DelCase.as_view())
]