Jan Dittberner
cea780a9b2
- sort all_hosting_packages before hosting_packages - allow _ in user names - only display hosting link if user is authenticated
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
"""
|
|
This module defines the URL patterns for hosting package related views.
|
|
|
|
"""
|
|
from __future__ import absolute_import, unicode_literals
|
|
|
|
from django.conf.urls import patterns, url
|
|
|
|
from .views import (
|
|
AddHostingOption,
|
|
AllCustomerHostingPackageList,
|
|
CreateCustomerHostingPackage,
|
|
CreateHostingPackage,
|
|
CustomerHostingPackageDetails,
|
|
CustomerHostingPackageList,
|
|
HostingOptionChoices,
|
|
)
|
|
|
|
|
|
urlpatterns = patterns(
|
|
'',
|
|
url(r'^create$', CreateHostingPackage.as_view(),
|
|
name='create_hosting_package'),
|
|
url(r'^allpackages/',
|
|
AllCustomerHostingPackageList.as_view(), name='all_hosting_packages'),
|
|
url(r'^(?P<user>[-\w0-9@.+_]+)/$',
|
|
CustomerHostingPackageList.as_view(), name='hosting_packages'),
|
|
url(r'^(?P<user>[-\w0-9@.+_]+)/create$',
|
|
CreateCustomerHostingPackage.as_view(),
|
|
name='create_customer_hosting_package'),
|
|
url(r'^(?P<user>[-\w0-9@.+_]+)/(?P<pk>\d+)/$',
|
|
CustomerHostingPackageDetails.as_view(),
|
|
name='hosting_package_details'),
|
|
url(r'^(?P<pk>\d+)/option-choices$',
|
|
HostingOptionChoices.as_view(), name='hosting_option_choices'),
|
|
url(r'^(?P<package>\d+)/add-option/(?P<type>\w+)/(?P<optionid>\d+)$',
|
|
AddHostingOption.as_view(), name='add_hosting_option'),
|
|
)
|