add allauth configuration and message tags
This commit is contained in:
parent
286c477efc
commit
ab313a2a66
3 changed files with 26 additions and 4 deletions
|
@ -51,9 +51,9 @@
|
|||
{% if user.is_authenticated %}
|
||||
<li><a href="#">{% trans "My Profile" %}</a></li>
|
||||
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}">{% trans "Admin site" %}</a></li>{% endif %}
|
||||
<li><a href="{% url 'logout' %}">{% trans "Logout" %}</a></li>
|
||||
<li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login' %}?next={{ request.path }}">{% trans "Sign In" %}</a></li>
|
||||
<li><a href="{% url 'account_login' %}?next={{ request.path }}">{% trans "Sign In" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
|
@ -64,6 +64,14 @@
|
|||
|
||||
<h1>{% block page_title %}Example Base Template{% endblock page_title %}</h1>
|
||||
|
||||
{% if messages %}
|
||||
<ul class="list-unstyled">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
<p>Use this document as a way to quick start any new project.</p>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -9,6 +9,6 @@ You can visit your <a href="{{ dashboard_url }}">Dashboard</a> to view and modif
|
|||
{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>{% trans "This is your entry to our customer self service sytem." %}</p>
|
||||
<p>{% url 'login' as login_url %}{% url 'dashboard' as dashboard_url %}{% blocktrans %}If you are already a customer you can <a href="{{ login_url }}?next={{ dashboard_url }}">Sign in</a> to view and modify your hosting options.{% endblocktrans %}</p>
|
||||
<p>{% url 'account_login' as login_url %}{% url 'dashboard' as dashboard_url %}{% blocktrans %}If you are already a customer you can <a href="{{ login_url }}?next={{ dashboard_url }}">Sign in</a> to view and modify your hosting options.{% endblocktrans %}</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue