Commit baba65ad authored by yumaojun03's avatar yumaojun03

修改url模块, 匹配整体架构风格.

parent d0460d86
......@@ -30,7 +30,7 @@ urlpatterns = [
url(r'^perms/', include('perms.urls.views_urls', namespace='perms')),
url(r'^audits/', include('audits.urls.views_urls', namespace='audits')),
url(r'^terminal/', include('terminal.urls.views_urls', namespace='terminal')),
url('^ops/', include('ops.urls.view_urls'), name='ops'),
url('^ops/', include('ops.urls.view_urls', namespace='ops')),
url(r'^api/users/', include('users.urls.api_urls', namespace='api-users')),
url(r'^api/assets/', include('assets.urls.api_urls', namespace='api-assets')),
......
from rest_framework.routers import DefaultRouter
from ops.api import views as ops_api_view
api_router = DefaultRouter()
api_router.register(r'host_alia', ops_api_view.HostAliaViewSet)
api_router.register(r'user_alia', ops_api_view.UserAliaViewSet)
api_router.register(r'cmd_alia', ops_api_view.CmdAliaViewSet)
api_router.register(r'runas_alia', ops_api_view.RunasAliaViewSet)
api_router.register(r'extra_conf', ops_api_view.ExtraconfViewSet)
api_router.register(r'privilege', ops_api_view.PrivilegeViewSet)
api_router.register(r'sudo', ops_api_view.SudoViewSet)
api_router.register(r'cron', ops_api_view.CronTableViewSet)
urlpatterns = api_router.urls
\ No newline at end of file
# ~*~ coding: utf-8 ~*~
from __future__ import unicode_literals
from django.conf.urls import url
from ops import views as page_view
app_name = 'ops'
urlpatterns = [
# Resource Sudo url
url(r'^sudo/list$', page_view.SudoListView.as_view(), name='page-sudo-list'),
url(r'^sudo/create$', page_view.SudoCreateView.as_view(), name='page-sudo-create'),
url(r'^sudo/detail$', page_view.SudoDetailView.as_view(), name='page-sudo-detail'),
url(r'^sudo/update$', page_view.SudoUpdateView.as_view(), name='page-sudo-update'),
# Resource Cron url
url(r'^cron/list$', page_view.CronListView.as_view(), name='page-cron-list'),
url(r'^cron/create$', page_view.CronCreateView.as_view(), name='page-cron-create'),
url(r'^cron/detail$', page_view.CronDetailView.as_view(), name='page-cron-detail'),
url(r'^cron/update$', page_view.CronUpdateView.as_view(), name='page-cron-update'),
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment