Added authorization page
This commit is contained in:
parent
2919761b2f
commit
f6193a837a
@ -126,3 +126,6 @@ STATICFILES_DIRS = [
|
||||
]
|
||||
|
||||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
LOGOUT_REDIRECT_URL = '/'
|
||||
|
@ -14,8 +14,9 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
]
|
||||
|
BIN
layouts/authorization/authorization.jpg
Normal file
BIN
layouts/authorization/authorization.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
37
main/templates/registration/login.html
Normal file
37
main/templates/registration/login.html
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends 'base/base.html' %}
|
||||
{% block title %}
|
||||
Авторизация
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="card mx-auto" style="width: 40rem">
|
||||
<div class="card-body pb-0">
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
<label class="form-label" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
<input
|
||||
required=""
|
||||
class="form-control mb-3"
|
||||
id="{{ field.id_for_label }}"
|
||||
name="{{ field.html_name }}"
|
||||
type="{{ field.widget_type }}"
|
||||
/>
|
||||
{% endfor %}
|
||||
{% if form.non_field_errors %}
|
||||
<ul class='form-errors'>
|
||||
{% for error in form.non_field_errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-primary">Войти</button>
|
||||
<a href="" class="btn btn-link" style="display: block;">Забыли пароль?</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user