-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogin.html
More file actions
50 lines (48 loc) · 1.52 KB
/
Copy pathlogin.html
File metadata and controls
50 lines (48 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% extends 'base/base.html' %}
{% load static %}
{% block title %}UrbPy - Login{% endblock title %}
{% block body %}
<main class="container">
<div class="container">
<div class="row">
<div class="col">
{% if form.errors %}
<div class="alert alert-danger" role="alert">
Usuário ou senha incorretos. Por favor, tente novamente.
</div>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>Sua conta não tem acesso a esta página. Para continuar,
<a href="/login">faça login</a> com uma conta que tenha permissão.
</p>
{% else %}
<p>Por favor faça login para ver esta página.</p>
{% endif %}
{% endif %}
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="login">
<input type="hidden" name="next" value="{{ next }}">
<!-- Widget Turnstile -->
<div class="cf-turnstile" data-sitekey="0x4AAAAAABmOHLhpp2TS6aRh" data-theme="light"></div>
<!-- Script Turnstile -->
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
</form>
{# Assumes you set up the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">Esqueceu sua senha?</a></p>
</div>
</div>
</div>
</main>
{% endblock body %}