Make it possible to list all events, not just the ones of the current user #57

Merged
gergely merged 1 commits from list-all-events into master 2018-07-11 11:05:34 +00:00
1 changed files with 14 additions and 0 deletions

View File

@ -415,5 +415,19 @@ class CalendarSocialApp(Flask):
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__)