Add app url namespacing to the common and main apps, fix missing namespace in the registration app, remove explict reverse_lazy for the LOGIN_URL and LOGIN_REDIRECT_URL these are expected to be views or URLs (failover)

This commit is contained in:
Roberto Rosario
2014-09-09 03:51:23 -04:00
parent 7dfacc624c
commit f5bef4b52d
11 changed files with 26 additions and 27 deletions
+4 -4
View File
@@ -148,7 +148,7 @@
{% else %}
{% if not web_theme_hide_menus %}
<div id="header">
<h1><a href="{% url 'home' %}">{% project_name %}{% if debug %} {% trans "(DEBUG)" %}{% endif %} - {% registered_name %}</a></h1>
<h1><a href="{% url 'main:home' %}">{% project_name %}{% if debug %} {% trans "(DEBUG)" %}{% endif %} - {% registered_name %}</a></h1>
<div id="main-navigation">
<ul class="wat-cf" style="width: 73%;">
{% get_top_menu_links %}
@@ -172,14 +172,14 @@
{% trans 'Anonymous' %}
{% else %}
{{ user.get_full_name|default:user }}
<a href="{% url 'current_user_details' %}" title="{% trans 'User details' %}"><span class="famfam active famfam-vcard"></span></a>
<a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}"><span class="famfam active famfam-vcard"></span></a>
{% endif %}
</li>
{% get_setting "MIDDLEWARE_CLASSES" as middleware_classes %}
{% if 'django.middleware.locale.LocaleMiddleware' in middleware_classes %}
<li>
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<form action="{% url 'common:set_language' %}" method="post">{% csrf_token %}
<select name="language" onchange="this.form.submit()">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}" {% if lang.0 == LANGUAGE_CODE %}selected="selected"{% endif %}>{{ lang.0|language_name_local|capfirst }}</option>
@@ -189,7 +189,7 @@
</li>
{% endif %}
{% get_setting "LOGIN_URL" as login_url %}
<li><a class="logout" href="{% if not user.is_authenticated %}{% url 'login_view' %}?next=/{% else %}{% url 'logout_view' %}{% endif %}">{% if not user.is_authenticated %}{% trans 'Login' %}{% else %}{% trans 'Logout' %}{% endif %}</a></li>
<li><a class="logout" href="{% if not user.is_authenticated %}{% url 'common:login_view' %}?next=/{% else %}{% url 'common:logout_view' %}{% endif %}">{% if not user.is_authenticated %}{% trans 'Login' %}{% else %}{% trans 'Logout' %}{% endif %}</a></li>
</ul>
</div>
</div>