wulkanowy-web/frontend/views.py

18 lines
600 B
Python
Raw Normal View History

2021-01-23 12:23:24 +01:00
from django.shortcuts import render
from django.shortcuts import redirect
def default_view(request, *args, **kwargs):
2021-01-28 11:06:57 +01:00
request.session['has_session'] = True
2021-01-23 12:23:24 +01:00
return render(request, 'frontend/index.html')
def content_view(request, *args, **kwargs):
if request.session.has_key('is_logged'):
return render(request, 'frontend/content.html')
2021-01-25 22:56:04 +01:00
else:
return redirect('../')
def account_manager_view(request, *args, **kwargs):
if request.session.has_key('is_logged'):
return render(request, 'frontend/account-manager.html')
2021-01-23 12:23:24 +01:00
else:
return redirect('../')