forked from gergely/calendar-social
Create a view that can list all events
This commit is contained in:
parent
48ffb0d472
commit
8e3bcd8ede
@ -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__)
|
||||||
|
Loading…
Reference in New Issue
Block a user