Create the contents of the welcome page

This commit is contained in:
2018-07-15 07:17:22 +02:00
parent 13e55e7c68
commit ff304dc64d
3 changed files with 110 additions and 4 deletions

View File

@@ -161,9 +161,6 @@ class CalendarSocialApp(Flask):
from .calendar_system.gregorian import GregorianCalendar
if not current_user.is_authenticated:
return render_template('welcome.html')
try:
timestamp = datetime.fromtimestamp(float(request.args.get('date')))
except TypeError:
@@ -171,6 +168,14 @@ class CalendarSocialApp(Flask):
calendar = GregorianCalendar(timestamp.timestamp())
if not current_user.is_authenticated:
login_form_class = current_app.extensions['security'].login_form
login_form = login_form_class()
return render_template('welcome.html',
calendar=calendar,
user_only=False,
login_form=login_form)
return render_template('index.html', calendar=calendar, user_only=True)
@staticmethod