forked from gergely/calendar-social
Create the contents of the welcome page
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user