v0.0.00.5
This commit is contained in:
parent
df69a89ed7
commit
7932717980
@ -3,10 +3,11 @@ from django.shortcuts import redirect
|
||||
import re
|
||||
|
||||
EXEMPT_URLS = [
|
||||
re.compile(settings.LOGIN_URL.lstrip('/')), # eg. '^login/$'
|
||||
re.compile(settings.LOGIN_URL.lstrip('/')), # eg. 'streaming/login/'
|
||||
re.compile(r'^admin/login/$'), # админ-логин
|
||||
re.compile(r'^static/'), # статика
|
||||
re.compile(r'^media/'), # медиаконтент
|
||||
re.compile(r'^liquid/login/$'), # <-- добавь это!
|
||||
re.compile(r'^static/'),
|
||||
re.compile(r'^media/'),
|
||||
]
|
||||
|
||||
class LoginRequiredMiddleware:
|
||||
|
||||
@ -87,7 +87,7 @@ TEMPLATES = [
|
||||
CSRF_COOKIE_SECURE = False
|
||||
SESSION_COOKIE_SECURE = False
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ['http://192.168.0.169:8106']
|
||||
CSRF_TRUSTED_ORIGINS = ['http://192.168.0.169']
|
||||
|
||||
WSGI_APPLICATION = 'app.wsgi.application'
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@ def login_view(request):
|
||||
login(request, user)
|
||||
return redirect('stream')
|
||||
else:
|
||||
return render(request, 'login.html', {'error': 'Неверный логин или пароль'})
|
||||
return render(request, 'login.html')
|
||||
return render(request, 'templates/login.html', {'error': 'Неверный логин или пароль'})
|
||||
return render(request, 'templates/login.html')
|
||||
|
||||
def logout_view(request):
|
||||
logout(request)
|
||||
@ -25,7 +25,7 @@ def logout_view(request):
|
||||
@login_required
|
||||
def stream_view(request):
|
||||
history = DetectionHistory.objects.all()[:20]
|
||||
return render(request, 'streaming/stream.html',{
|
||||
return render(request, 'templates/streaming/stream.html',{
|
||||
"websocket_url": settings.WEBSOCKET_URL,
|
||||
"history": history
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user