-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correções executdas para home e login
- Loading branch information
1 parent
13a8dc8
commit 56517a9
Showing
4 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "base.html" %} | ||
{% block title %} | ||
Home | ||
{% endblock title %} | ||
{% block content %} | ||
<h1>Pagina Home</h1> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from django.shortcuts import render | ||
from django.shortcuts import render, redirect | ||
|
||
# @login_required(login_url='/auth/login') | ||
|
||
|
||
def home(request): | ||
|
||
# return redirect('login') | ||
|
||
return render(request, "base.html", {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,24 @@ | ||
{% extends "base.html" %} | ||
{% block title %} | ||
Login | ||
{% endblock title %} | ||
{% block content %} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
<form method="post" action="{% url 'login' %}"> | ||
{% csrf_token %} | ||
<label> | ||
<input type="checkbox" checked="checked" name="remember"> | ||
Remember me | ||
</label> | ||
<div> | ||
<label for="">Email</label> | ||
<input type="text" | ||
name="email" | ||
id="email" | ||
placeholder="[email protected]" | ||
required="required" | ||
pattern="^[0-9a-zA-Z-._+]+@[a-zA-Z0-9-_+]+\.[a-zA-Z]+(\.[a-zA-Z]+)?"> | ||
<input type="text" name="email" id="email" placeholder="[email protected]" required="required" | ||
pattern="^[0-9a-zA-Z-._+]+@[a-zA-Z0-9-_+]+\.[a-zA-Z]+(\.[a-zA-Z]+)?"> | ||
<span>(*)</span> | ||
</div> | ||
<div> | ||
<label for="">Senha</label> | ||
<input type="password" | ||
name="senha" | ||
id="senha" | ||
placeholder="Senha" | ||
required="required"> | ||
<input type="password" name="senha" id="senha" placeholder="Senha" required="required"> | ||
<span>(*)</span> | ||
</div> | ||
<button type="submit">Login</button> | ||
|
@@ -38,4 +31,6 @@ | |
<span>Forgot <a href="#">password?</a></span> | ||
</div> | ||
</form> | ||
{% endblock content %} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters