コード例 #1
0
ファイル: urls.py プロジェクト: BurnzZ/open-pse-initiative
from django.conf.urls import patterns, url

from companies.views import CompanyListView

urlpatterns = patterns("", url(r"^$", CompanyListView.as_view(), name="companies_list"))
コード例 #2
0
from django.conf.urls.static import static
from django.utils.translation import ugettext_lazy as _

from companies.views import CompanyListView, CompanyDetailsView
from users.views import UserSignUpView, ConfirmView, \
    BillingAddressView, ConfirmVerifyView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^sign-up/(?P<company_id>[0-9]+)/',
        UserSignUpView.as_view(),
        name="sign-up"),
    url(r'^company-details/(?P<pk>[0-9]+)/',
        CompanyDetailsView.as_view(),
        name="company-details"),
    url(r'^confirm/', ConfirmVerifyView.as_view(), name='confirm'),
    url(r'^thank-you/', ConfirmView.as_view(), name='thank-you'),
    url(r'^billing-address/',
        BillingAddressView.as_view(),
        name='billing-address'),
    url(r'^$', CompanyListView.as_view(), name='main'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)

admin.site.site_header = _('Corporate SignUp Adminsite')
コード例 #3
0
             form_class=UserPasswordResetConfirmForm),
         name='password_reset_confirm'),
    path('password_change/',
         PasswordChangeView.as_view(
             template_name="registration/password_change_form.html",
             form_class=UserPasswordChangeForm),
         name='password_change'),
    path('activate/<uidb64>/<token>/', activate, name='activate'),
    path('registration/', UserRegistrationView.as_view(), name='registration'),
    path('profile/', UserProfileView.as_view(), name='profile'),
    path('profile/update/<int:pk>/',
         UserUpdateView.as_view(),
         name='profile-update'),
    path('profile/delete/<int:pk>/',
         UserDeleteView.as_view(),
         name='profile-delete'),
    path('profile/companies/', CompanyListView.as_view(), name='companies'),
    path('profile/managers/',
         ManagerListView.as_view(template_name='managers/manager_list.html'),
         name='managers'),
    path('profile/companies/add/',
         CompanyCreateView.as_view(),
         name='companies-add'),
    path('profile/companies/update/<slug:slug>/',
         CompanyUpdateView.as_view(),
         name='companies-update'),
    path('profile/companies/delete/<slug:slug>/',
         CompanyDeleteView.as_view(),
         name='companies-delete'),
]
コード例 #4
0
ファイル: urls.py プロジェクト: sephioh/dhcpy
# 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'),
    url(r'^branch/(?P<pk>\d+)/add-division$', BranchDivisionCreateView.as_view(), name='branch-division-create'),
    url(r'^branch/(?P<pk>\d+)/update$', TemplateView.as_view(template_name='404.html'), name='branch-update'),
    url(r'^branch/(?P<pk>\d+)/delete$', TemplateView.as_view(template_name='404.html'), name='branch-delete'),

    url(r'^division/(?P<pk>\d+)/$', DivisionDetailView.as_view(), name='division-detail'),
    url(r'^division/(?P<pk>\d+)/add-employee$', DivisionEmployeeCreateView.as_view(), name='division-employee-create'),
    url(r'^division/(?P<pk>\d+)/update$', TemplateView.as_view(template_name='404.html'), name='division-update'),
    url(r'^division/(?P<pk>\d+)/delete$', TemplateView.as_view(template_name='404.html'), name='division-delete'),