2013-12-15 17:09:22 +01:00
|
|
|
"""
|
|
|
|
main app url dispatching
|
|
|
|
"""
|
|
|
|
|
2013-09-29 15:37:58 +02:00
|
|
|
from django.conf.urls import patterns, url
|
2013-09-29 17:28:36 +02:00
|
|
|
from django.views.generic import TemplateView
|
2013-10-03 19:26:39 +02:00
|
|
|
|
2013-10-17 20:50:44 +00:00
|
|
|
from .views import (
|
2014-08-31 01:03:19 +02:00
|
|
|
HomeView, OverviewView, HostView, AddHostView, DeleteHostView, AboutView, GenerateSecretView, GenerateNSSecretView,
|
2014-08-31 01:23:38 +02:00
|
|
|
RobotsTxtView, DomainView, AddDomainView, DeleteDomainView, StatusView, JsUpdateView,
|
2014-09-25 20:15:18 +02:00
|
|
|
UpdaterHostConfigOverviewView, UpdaterHostConfigView, DeleteUpdaterHostConfigView,
|
|
|
|
RelatedHostOverviewView, RelatedHostView, AddRelatedHostView, DeleteRelatedHostView, CustomTemplateView)
|
2013-10-17 20:50:44 +00:00
|
|
|
from ..api.views import (
|
2014-01-21 17:50:01 +01:00
|
|
|
myip_view, DetectIpView, AjaxGetIps, NicUpdateView, AuthorizedNicUpdateView,
|
|
|
|
NicDeleteView, AuthorizedNicDeleteView)
|
2013-09-29 02:42:20 +02:00
|
|
|
|
2013-10-03 19:26:39 +02:00
|
|
|
|
2013-09-29 01:28:49 +02:00
|
|
|
urlpatterns = patterns(
|
|
|
|
'',
|
2013-11-04 22:17:41 +01:00
|
|
|
# interactive web ui
|
2013-09-28 12:06:26 +02:00
|
|
|
url(r'^$', HomeView.as_view(), name="home"),
|
2013-09-29 17:06:39 +02:00
|
|
|
url(r'^about/$', AboutView.as_view(), name="about"),
|
2014-01-21 23:48:51 +01:00
|
|
|
url(r'^custom/(?P<template>[\w.]+)$', CustomTemplateView.as_view(), name="custom"),
|
2013-12-06 20:44:50 +01:00
|
|
|
url(r'^update$', JsUpdateView.as_view(), name='update'),
|
2013-09-28 22:46:53 +02:00
|
|
|
url(r'^overview/$', OverviewView.as_view(), name='overview'),
|
2013-11-03 04:29:14 +01:00
|
|
|
url(r'^status/$', StatusView.as_view(), name='status'),
|
2013-09-29 19:58:08 +02:00
|
|
|
url(r'^generate_secret/(?P<pk>\d+)/$', GenerateSecretView.as_view(), name='generate_secret_view'),
|
2013-11-02 11:29:06 +01:00
|
|
|
url(r'^generate_ns_secret/(?P<pk>\d+)/$', GenerateNSSecretView.as_view(), name='generate_ns_secret_view'),
|
2014-09-25 20:15:18 +02:00
|
|
|
url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'),
|
2014-08-31 01:03:19 +02:00
|
|
|
url(r'^host/add/$', AddHostView.as_view(), name='add_host'),
|
2013-11-04 22:17:41 +01:00
|
|
|
url(r'^host/(?P<pk>\d+)/delete/$', DeleteHostView.as_view(), name='delete_host'),
|
2014-09-25 20:15:18 +02:00
|
|
|
url(r'^host/(?P<mpk>\d+)/related/$', RelatedHostOverviewView.as_view(), name='related_host_overview'),
|
|
|
|
url(r'^host/(?P<mpk>\d+)/related/(?P<pk>\d+)/$', RelatedHostView.as_view(), name='related_host_view'),
|
|
|
|
url(r'^host/(?P<mpk>\d+)/related/add/$', AddRelatedHostView.as_view(), name='add_related_host'),
|
|
|
|
url(r'^host/(?P<mpk>\d+)/related/(?P<pk>\d+)/delete/$', DeleteRelatedHostView.as_view(),
|
|
|
|
name='delete_related_host'),
|
|
|
|
url(r'^domain/(?P<pk>\d+)/$', DomainView.as_view(), name='domain_view'),
|
2014-08-31 01:03:19 +02:00
|
|
|
url(r'^domain/add/$', AddDomainView.as_view(), name='add_domain'),
|
2013-11-04 22:17:41 +01:00
|
|
|
url(r'^domain/(?P<pk>\d+)/delete/$', DeleteDomainView.as_view(), name='delete_domain'),
|
2013-11-29 10:43:18 +01:00
|
|
|
url(r'^updater_hostconfig_overview/(?P<pk>\d+)/$', UpdaterHostConfigOverviewView.as_view(),
|
|
|
|
name='updater_hostconfig_overview'),
|
|
|
|
url(r'^updater_hostconfig/(?P<pk>\d+)/$', UpdaterHostConfigView.as_view(), name='updater_hostconfig'),
|
|
|
|
url(r'^updater_hostconfig/(?P<pk>\d+)/delete/$', DeleteUpdaterHostConfigView.as_view(),
|
|
|
|
name='delete_updater_hostconfig'),
|
2013-11-04 22:17:41 +01:00
|
|
|
# internal use by the web ui
|
2013-11-15 13:00:57 +01:00
|
|
|
url(r'^detectip/(?P<sessionid>\w+)/$', DetectIpView.as_view(), name='detectip'),
|
2013-11-05 00:24:02 +01:00
|
|
|
url(r'^ajax_get_ips/$', AjaxGetIps.as_view(), name="ajax_get_ips"),
|
|
|
|
url(r'^nic/update_authorized$', AuthorizedNicUpdateView.as_view(), name='nic_update_authorized'),
|
2014-01-21 17:50:01 +01:00
|
|
|
url(r'^nic/delete_authorized$', AuthorizedNicDeleteView.as_view(), name='nic_delete_authorized'),
|
2013-11-04 22:17:41 +01:00
|
|
|
# api (for update clients)
|
2013-11-15 12:14:36 +01:00
|
|
|
url(r'^myip$', myip_view, name='myip'),
|
2013-11-15 13:00:57 +01:00
|
|
|
url(r'^nic/update$', NicUpdateView.as_view(), name='nic_update'),
|
2014-01-21 17:50:01 +01:00
|
|
|
url(r'^nic/delete$', NicDeleteView.as_view(), name='nic_delete'), # api extension
|
2013-11-04 22:17:41 +01:00
|
|
|
# for bots
|
2013-11-21 04:02:16 +01:00
|
|
|
url(r'^robots.txt$', RobotsTxtView.as_view(), name='robots'),
|
2013-09-28 11:39:57 +02:00
|
|
|
)
|