Пример #1
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from servers.models import Server
from servers.views import ServerListView, ServerDetailView, ServerCreateView, ServerUpdateView, RegistrarCreateView

# import views

urlpatterns = patterns(
    "",
    # /servers/一覧表示
    url(r"^$", ServerListView.as_view(), name="server-list"),
    # ID順
    url(r"^id_number/$", ServerListView.as_view(queryset=Server.objects.order_by("id_number"))),
    # ドメイン順
    url(r"^domain_name/$", ServerListView.as_view(queryset=Server.objects.order_by("domain_name"))),
    # 会社順aaaa
    url(r"^company_name/$", ServerListView.as_view(queryset=Server.objects.order_by("company_name"))),
    # 担当者順
    url(r"^sainet_charge/$", ServerListView.as_view(queryset=Server.objects.order_by("sainet_charge"))),
    # 詳細ページ
    # url(r'^(?P<pk>\d+)/$',
    # 	DetailView.as_view(
    # 		model=Server,
    # 		template_name='servers/detail.html')),
    url(r"^(?P<pk>\d+)/$", ServerDetailView.as_view()),
    # 新規作成ページ
    # url(r'^new/$',
    # 	CreateView.as_view(
    # 		model=Server,
    # 		template_name='servers/create.html',
Пример #2
0
from django.urls import path, include
from servers.views import ServerListView

urlpatterns = [
    path('', ServerListView.as_view(), name='home'),
    path('cart/', include('payments.urls')),
    path('customize_server/', include('customize_server.urls')),
    path('support/', include('supporttickets.urls'))
]
Пример #3
0
from django.conf.urls.defaults import patterns, include, url

from servers.views import ServerListView, DNSView
from servers.models import Server

urlpatterns = patterns('',
    url(r'^$', ServerListView.as_view()),
    url(r'^dns$', DNSView.as_view()),
)

Пример #4
0
from servers.views import ServerListView, ServerDetailView, ServerCreateView, ServerNicCreateView
from companies.views import CompanyListView, CompanyCreateView, CompanyDetailView, CompanyBranchCreateView
from companies.views import BranchDetailView, BranchDivisionCreateView
from companies.views import DivisionDetailView, DivisionEmployeeCreateView
from companies.views import CompanyDeviceListView, CompanyDeviceDetailView, CompanyDeviceNicCreateView, CompanyDeviceUpdateView
from companies.views import EmployeeDetailView, EmployeeCompanyDeviceCreateView, EmployeeUpdateView
from dhcpservices.views import DhcpServiceDetailView, DhcpServiceRenderConfDetailView, HostEntryCreateView
from netdevices.views import NetworkInterfaceUpdateView

# Enables admin interface
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', TemplateView.as_view(template_name='base.html'), name='home'),

    url(r'^servers/', ServerListView.as_view(), name='servers-list'),
    url(r'^server/(?P<pk>\d+)/$', ServerDetailView.as_view(), name='server-detail'),
    url(r'^server/create$', ServerCreateView.as_view(), name='server-create'),
    url(r'^server/(?P<pk>\d+)/add-nic$', ServerNicCreateView.as_view(), name='server-nic-create'),
    url(r'^server/(?P<pk>\d+)/update$', TemplateView.as_view(template_name='404.html'), name='server-update'),
    url(r'^server/(?P<pk>\d+)/delete$', TemplateView.as_view(template_name='404.html'), name='server-delete'),
    url(r'^server/(?P<pk>\d+)/enable-dhcpservice$', TemplateView.as_view(template_name='404.html'), name='server-enable-dhcpservice'),

    url(r'^companies/', CompanyListView.as_view(), name='companies-list'),
    url(r'^company/create$', CompanyCreateView.as_view(), name='company-create'),
    url(r'^company/(?P<pk>\d+)/$', CompanyDetailView.as_view(), name='company-detail'),
    url(r'^company/(?P<pk>\d+)/add-branch$', CompanyBranchCreateView.as_view(), name='company-branch-create'),
    url(r'^company/(?P<pk>\d+)/update$', TemplateView.as_view(template_name='404.html'), name='company-update'),
    url(r'^company/(?P<pk>\d+)/delete$', TemplateView.as_view(template_name='404.html'), name='company-delete'),
 
    url(r'^branch/(?P<pk>\d+)/$', BranchDetailView.as_view(), name='branch-detail'),