Merge branch 'master' of ssh://git.wiai.de:22222/mgoetz/roofis2

This commit is contained in:
Götz 2018-06-09 06:02:38 +02:00
commit 02a6a5f14b
4 changed files with 17 additions and 1 deletions

View File

@ -24,6 +24,7 @@ SECRET_KEY = 'e(4!&_nwsvyhml$gbv-v@0eodacfj22sf4gc+0x_&*ym4gl-16'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
LOGIN_REDIRECT_URL = 'roomservice:home'
ALLOWED_HOSTS = []

View File

@ -18,10 +18,17 @@ from django.contrib import admin
from rest_framework.authentication import BasicAuthentication
from rest_framework.documentation import include_docs_urls
from rest_framework.permissions import AllowAny
from django.contrib.auth import views as auth_views
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('roomservice.urls')),
path('login/', auth_views.login, {'template_name': 'login.jinja'}, name='login'),
path('logout/', auth_views.logout, name='logout'),
# APIs
# path('api/', include('respool.api.urls')),

View File

@ -1,5 +1,5 @@
from django.shortcuts import render
from roomservice.models import Room, Favorite
from django.shortcuts import render, redirect
import logging
logger = logging.getLogger(__name__)

View File

@ -0,0 +1,8 @@
{% extends 'base.jinja' %}
{% block content %}
<form method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
{{ form.as_p() }}
<button type="submit">Login</button>
</form>
{% endblock %}