fix issues with changed URLs
- sort all_hosting_packages before hosting_packages - allow _ in user names - only display hosting link if user is authenticated
This commit is contained in:
parent
5d19120bbf
commit
cea780a9b2
2 changed files with 9 additions and 9 deletions
|
@ -21,16 +21,16 @@ urlpatterns = patterns(
|
|||
'',
|
||||
url(r'^create$', CreateHostingPackage.as_view(),
|
||||
name='create_hosting_package'),
|
||||
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'^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+)$',
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<li><a href="{% url 'all_hosting_packages' %}">{% trans "All hosting packages" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
{% elif user.is_authenticated %}
|
||||
<li{% if active_item == 'hostingpackage' %} class="active"{% endif %}><a href="{% url 'hosting_packages' user=user.username %}">{% trans "Hosting" %}</a></li>
|
||||
{% endif %}
|
||||
<li class="dropdown">
|
||||
|
|
Loading…
Reference in a new issue