Merge branch 'master' of ssh://git.wiai.de:22222/mgoetz/roofis2
This commit is contained in:
commit
02a6a5f14b
@ -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!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
LOGIN_REDIRECT_URL = 'roomservice:home'
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,17 @@ from django.contrib import admin
|
|||||||
from rest_framework.authentication import BasicAuthentication
|
from rest_framework.authentication import BasicAuthentication
|
||||||
from rest_framework.documentation import include_docs_urls
|
from rest_framework.documentation import include_docs_urls
|
||||||
from rest_framework.permissions import AllowAny
|
from rest_framework.permissions import AllowAny
|
||||||
|
from django.contrib.auth import views as auth_views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('', include('roomservice.urls')),
|
path('', include('roomservice.urls')),
|
||||||
|
|
||||||
|
path('login/', auth_views.login, {'template_name': 'login.jinja'}, name='login'),
|
||||||
|
path('logout/', auth_views.logout, name='logout'),
|
||||||
|
|
||||||
|
|
||||||
# APIs
|
# APIs
|
||||||
# path('api/', include('respool.api.urls')),
|
# path('api/', include('respool.api.urls')),
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from django.shortcuts import render
|
|
||||||
from roomservice.models import Room, Favorite
|
from roomservice.models import Room, Favorite
|
||||||
|
from django.shortcuts import render, redirect
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|||||||
8
roofis2/templates/login.jinja
Normal file
8
roofis2/templates/login.jinja
Normal 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 %}
|
||||||
Reference in New Issue
Block a user