<commit_before>{% extends 'base.html' %}
{% load i18n %}
{% block content %}

{% if next %}
    {% if user.is_authenticated %}
      <p>{% trans "Your account doesn't have access to this page. To proceed, please login with an account that has access." %}</p>
    {% else %}
      <p>{% trans "Please login to see this page." %}</p>
    {% endif %}
{% endif %}

<form action="{% url 'login' %}" method="post">
  {% csrf_token %}
  <table>
    {{ form.as_table }}
  </table>
  <input type="submit" class="button" value="{% trans "Submit" %}"/>
  {% url 'logout' as logout_url %}
  {% if not next == logout_url %}
    <input type="hidden" name="next" value="{% url 'user-profile' %}"/>
  {% endif %}
</form>

<p><a href="{% url 'password_reset' %}" style="color: #9ACC00;">{% trans "Lost password?" %}</a></p>
{% endblock %}<commit_msg>Use given next parameter for redirect on login. Fixes #95<commit_after>{% extends 'base.html' %}
{% load i18n %}
{% block content %}

{% if next %}
    {% if user.is_authenticated %}
      <p>{% trans "Your account doesn't have access to this page. To proceed, please login with an account that has access." %}</p>
    {% else %}
      <p>{% trans "Please login to see this page." %}</p>
    {% endif %}
{% endif %}

<form action="{% url 'login' %}" method="post">
  {% csrf_token %}
  <table>
    {{ form.as_table }}
  </table>
  <input type="submit" class="button" value="{% trans "Submit" %}"/>
  {% url 'logout' as logout_url %}
  {% if not next == logout_url %}
  <input type="hidden" name="next" value="{{ next }}"/>
  {% endif %}
</form>

<p><a href="{% url 'password_reset' %}" style="color: #9ACC00;">{% trans "Lost password?" %}</a></p>
{% endblock %}
{'fraction_non_alphanumeric': 0.2190082644628099, 'fraction_numerical': 0.0070838252656434475, 'mean_word_length': 3.5934959349593494, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353149', 'n_tokens_mistral': 644, 'n_tokens_neox': 564, 'n_words': 180}