Files
myapp-full/myapp/ns_common/views.py
2023-02-18 09:22:43 +03:00

21 lines
576 B
Python

__author__ = 'RemiZOffAlex'
__copyright__ = '(c) RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'
from flask import render_template, session, redirect
from .. import app, lib
@app.route('/')
def index():
pagedata = {}
pagedata['title'] = app.config['TITLE']
if lib.get_user():
pagedata['info'] = 'Закрытый раздел'
body = render_template('user/index.html', pagedata=pagedata)
else:
pagedata['info'] = 'Открытый раздел'
body = render_template('guest/index.html', pagedata=pagedata)
return body