add stub login page
This commit is contained in:
@ -78,6 +78,9 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
)
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
|
||||
@ -117,4 +120,6 @@ USE_TZ = True
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
|
||||
from .settings_ansible import *
|
||||
|
||||
@ -14,8 +14,18 @@ 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 include, path
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
]
|
||||
|
||||
# accounts/login/ [name='login']
|
||||
# accounts/logout/ [name='logout']
|
||||
# accounts/password_change/ [name='password_change']
|
||||
# accounts/password_change/done/ [name='password_change_done']
|
||||
# accounts/password_reset/ [name='password_reset']
|
||||
# accounts/password_reset/done/ [name='password_reset_done']
|
||||
# accounts/reset/<uidb64>/<token>/ [name='password_reset_confirm']
|
||||
# accounts/reset/done/ [name='password_reset_complete']
|
||||
|
||||
22
templates/base.html
Normal file
22
templates/base.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% load staticfiles %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>TITLE</title>
|
||||
<link rel="stylesheet" href="{% static 'main.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
{% block navigation %}
|
||||
<div class="container navigation">
|
||||
NAV
|
||||
</div>
|
||||
{% endblock%}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<script src="{% static 'app.js' %}"></script>
|
||||
</body>
|
||||
</html>
|
||||
12
templates/registration/login.html
Normal file
12
templates/registration/login.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Login</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user