add new views to hostingpackages app

- rename CreateHostingPackage to CreateCustomerHostingPackage
- add new CreateHostingPackage that allows to select a customer
- rename CreateHostingPackageForm to CreateCustomerHostingPackageForm
- add new CreateHostingPackageForm that has a customer field
- add new URL pattern create_hosting_package, rename existing pattern to
  create_customer_hosting_package
- modify template dashboard/user_dashboard to use the correct URL name
This commit is contained in:
Jan Dittberner 2015-01-24 23:34:15 +01:00
parent 7991d2bf4f
commit 4bffa5ec62
4 changed files with 80 additions and 19 deletions

View file

@ -7,16 +7,24 @@ from __future__ import absolute_import, unicode_literals
from django.conf.urls import patterns, url
from .views import (
AllCustomerHostingPackageList,
CreateHostingPackage,
CreateCustomerHostingPackage,
CustomerHostingPackageDetails,
)
urlpatterns = patterns(
'',
url(r'^(?P<user>[\w0-9@.+-_]+)/create$', CreateHostingPackage.as_view(),
url(r'^create$', CreateHostingPackage.as_view(),
name='create_hosting_package'),
url(r'^(?P<user>[\w0-9@.+-_]+)/create$',
CreateCustomerHostingPackage.as_view(),
name='create_customer_hosting_package'),
url(r'^(?P<user>[\w0-9@.+-_]+)/hostingpackage/(?P<pk>\d+)/$',
CustomerHostingPackageDetails.as_view(),
name='hosting_package_details'),
url(r'^allpackages/',
AllCustomerHostingPackageList.as_view(),
name='all_hosting_packages'),
)