buda-wtmw-cooperation
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

login.html
text/html

Download raw (871 bytes)

{% extends "base.html" %}
{% load i18n %}

{% block title %}
    <h1>{% trans "Login" %}</h1>
{% endblock %}

{% block content %}
  {% if not user.is_authenticated %}
      {% if form.errors %}
      <p class="error">{% trans "Your username and password didn't match. Please try again." %}</p>
      {% endif %}
    
      <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
        {% csrf_token %}
            {{ form.username.label_tag }}
            {{ form.username }}
            {{ form.password.label_tag }}
            {{ form.password }}
    
        <input class="submit" type="submit" value="{% trans "Login" %}" />
        <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
      </form>
    {% else %}
    <p>You are already logged in—welcome!</p>
    {% endif %}
{% endblock %}