Create a view that can list all events

This commit is contained in:
Gergely Polonkai 2018-07-11 12:57:09 +02:00
parent 48ffb0d472
commit 8e3bcd8ede

View File

@ -415,5 +415,19 @@ class CalendarSocialApp(Flask):
return render_template('profile-edit.html', form=form) return render_template('profile-edit.html', form=form)
@staticmethod
@route('/all-events')
def all_events():
from .calendar_system.gregorian import GregorianCalendar
try:
timestamp = datetime.fromtimestamp(float(request.args.get('date')))
except TypeError:
timestamp = datetime.utcnow()
calendar = GregorianCalendar(timestamp.timestamp())
return render_template('index.html', calendar=calendar, user_only=False)
app = CalendarSocialApp(__name__) app = CalendarSocialApp(__name__)