wulkanowy-web/frontend/views.py
2021-01-28 11:06:57 +01:00

18 lines
No EOL
600 B
Python

from django.shortcuts import render
from django.shortcuts import redirect
def default_view(request, *args, **kwargs):
request.session['has_session'] = True
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')
else:
return redirect('../')
def account_manager_view(request, *args, **kwargs):
if request.session.has_key('is_logged'):
return render(request, 'frontend/account-manager.html')
else:
return redirect('../')