implement adding options to hosting packages

- fix unique constraints on CustomerDiskSpaceOption and
  CustomerUserDatabaseOption to allow multiple options from the same template
  for hosting packages
- fix disk space calculation in CustomerHostingPackage
- implement hostingpackages forms AddDiskspaceOptionForm, AddMailboxOptionForm,
  AddUserDatabaseOptionForm
- implement hostingpackages.views.AddHostingOption
- add new URL pattern add_hosting_option to hostingpackages.urls
- add template hostingpackages/add_hosting_option.html
- link items on hostingpackages/customerhostingpackage_option_choices.html to
  add_hosting_option
This commit is contained in:
Jan Dittberner 2015-01-25 15:15:39 +01:00
parent 9815bd1f5b
commit 0fc823a305
8 changed files with 229 additions and 14 deletions

View file

@ -7,6 +7,7 @@ from __future__ import absolute_import, unicode_literals
from django.conf.urls import patterns, url
from .views import (
AddHostingOption,
AllCustomerHostingPackageList,
CreateCustomerHostingPackage,
CreateHostingPackage,
@ -26,9 +27,9 @@ urlpatterns = patterns(
CustomerHostingPackageDetails.as_view(),
name='hosting_package_details'),
url(r'^allpackages/',
AllCustomerHostingPackageList.as_view(),
name='all_hosting_packages'),
AllCustomerHostingPackageList.as_view(), name='all_hosting_packages'),
url(r'^(?P<pk>\d+)/option-choices$',
HostingOptionChoices.as_view(),
name='hosting_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'),
)