We're now showing the login link with a http:// scheme instead of https:// when in debug mode, in order to be able to log in when using 'python manage.py runserver', which only supports http.

- Legacy-Id: 7636
This commit is contained in:
Henrik Levkowetz 2014-04-24 22:04:52 +00:00
parent 94123b37e0
commit bfa77959e5

View file

@ -60,12 +60,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% if user %}
<div id="ietf-login" class="noprint">
{% if request.get_full_path == "/accounts/logout/" %}
<a href="https://{{ request.get_host }}/accounts/login/" class="login" rel="nofollow">Sign in</a>
<a href="{% if debug %}http://{% else %}https://{% endif %}{{ request.get_host }}/accounts/login/" class="login" rel="nofollow">Sign in</a>
{% else %}
{% if user.is_authenticated %}
<a href="/accounts/">{{ user }}</a> | <a href="/accounts/logout/" class="login" rel="nofollow">Sign out</a>
{% else %}
<a href="https://{{ request.get_host }}/accounts/login/?next={{request.get_full_path|urlencode}}" class="login" rel="nofollow">Sign in</a>
<a href="{% if debug %}http://{% else %}https://{% endif %}{{ request.get_host }}/accounts/login/?next={{request.get_full_path|urlencode}}" class="login" rel="nofollow">Sign in</a>
{% endif %}
{% endif %}
</div>