#Register webterminal api router = routers.DefaultRouter() router.register('servergroup', ServerGroupViewSet) router.register('serverinfo', ServerInforViewSet) router.register('commandssequence', CommandsSequenceViewSet) router.register('credential', CredentialViewSet) urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^guacamole/', include('guacamole.urls')), url(r'^$', Index.as_view(), name='index'), url(r'^commands/add/$', Commands.as_view(), name='commandscreate'), url(r'^commandexecute/$', CommandExecute.as_view(), name='commandexecute'), url(r'^commandslist/$', CommandExecuteList.as_view(), name='commandslist'), url(r'^commandsapi/$', CommandExecuteDetailApi.as_view(), name='commandsapi'), url(r'^accounts/login/$', LoginView.as_view(template_name='admin/login.html'), name='login'), url(r'^accounts/logout/$', LogoutView.as_view(template_name='registration/logged_out.html'), name='logout'), url(r'^credentialcreate/$', CredentialCreate.as_view(), name='credentialcreate'), url(r'^credentiallist/$', CredentialList.as_view(), name='credentiallist'), url(r'^credentialdetailapi/$', CredentialDetailApi.as_view(), name='credentialdetailapi'), url(r'^servercreate/$', ServerCreate.as_view(), name='servercreate'),
from django.contrib.staticfiles.urls import staticfiles_urlpatterns #Register webterminal api router = routers.DefaultRouter() router.register('servergroup', ServerGroupViewSet) router.register('serverinfo', ServerInforViewSet) router.register('commandssequence', CommandsSequenceViewSet) router.register('credential', CredentialViewSet) urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$',Index.as_view(),name='index'), url(r'^commands/add/$',Commands.as_view(),name='commandscreate'), url(r'^commandexecute/$',CommandExecute.as_view(),name='commandexecute'), url(r'^commandslist/$',CommandExecuteList.as_view(),name='commandslist'), url(r'^commandsapi/$',CommandExecuteDetailApi.as_view(),name='commandsapi'), url(r'^accounts/login/$', LoginView.as_view(template_name='admin/login.html'),name='login'), url(r'^accounts/logout/$',LogoutView.as_view(template_name='registration/logged_out.html'),name='logout'), url(r'^credentialcreate/$',CredentialCreate.as_view(),name='credentialcreate'), url(r'^credentiallist/$',CredentialList.as_view(),name='credentiallist'), url(r'^credentialdetailapi/$',CredentialDetailApi.as_view(),name='credentialdetailapi'), url(r'^servercreate/$',ServerCreate.as_view(),name='servercreate'), url(r'^serverlist/$',ServerlList.as_view(),name='serverlist'), url(r'^groupcreate/$',GroupCreate.as_view(),name='groupcreate'), url(r'^grouplist/$',GroupList.as_view(),name='grouplist'), url(r'^sshlogslist/$',SshLogList.as_view(),name='sshlogslist'), url(r'^sshlogplay/(?P<pk>[0-9]+)/',SshLogPlay.as_view(),name='sshlogplay'), url(r'^elfinder/',include('elfinder.urls')), url(r'^api/',include(router.urls)), ]