Artur Galyamov
2 years ago
6 changed files with 68 additions and 1 deletions
@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %} |
||||
{% load bootstrap5 %} |
||||
{% block content %} |
||||
<div class="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<form |
||||
action="{% url 'authenticate' %}" |
||||
method="post" |
||||
enctype="application/x-www-form-urlencoded" |
||||
> |
||||
{% csrf_token %} |
||||
{% bootstrap_form user_form %} |
||||
{% buttons %} |
||||
<button |
||||
class="btn btn-primary" |
||||
type="submit" |
||||
> |
||||
Войти |
||||
</button> |
||||
{% endbuttons %} |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
@ -1,8 +1,13 @@
|
||||
from django.urls import path |
||||
|
||||
from .views import ArticleView, new_article |
||||
from .views import ArticleView, new_article, AuthenticationView |
||||
|
||||
urlpatterns = [ |
||||
path('articles/', ArticleView.as_view(), name='create-article'), |
||||
path('articles/new/', new_article, name='new-article'), |
||||
path( |
||||
'', |
||||
AuthenticationView.as_view(), |
||||
name='authenticate' |
||||
) |
||||
] |
||||
|
Loading…
Reference in new issue