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

@ -42,7 +42,7 @@
<p class="text-info">{% if user == object %}{% trans "You have no hosting packages yet." %}{% else %}{% trans "This user has no hosting packages assigned yet." %}{% endif %}</p>
{% endif %}
{% if user.is_staff %}
<a href="{% url "create_hosting_package" user=object.username %}" class="btn btn-primary">{% trans "Add hosting package" %}</a>
<a href="{% url "create_customer_hosting_package" user=object.username %}" class="btn btn-primary">{% trans "Add hosting package" %}</a>
{% endif %}
</div>
</div>