forked from gergely/calendar-social
Allow users to list their notifications
This is in very early stage, but at least it works.
This commit is contained in:
@@ -288,4 +288,16 @@ class CalendarSocialApp(Flask):
|
||||
|
||||
return redirect(url_for('display_profile', username=username))
|
||||
|
||||
@staticmethod
|
||||
@route('/notifications')
|
||||
def notifications():
|
||||
from .models import Notification
|
||||
|
||||
if current_user.is_authenticated:
|
||||
notifs = Notification.query.filter(Notification.profile == current_user.profile)
|
||||
else:
|
||||
notifs = []
|
||||
|
||||
return render_template('notifications.html', notifs=notifs)
|
||||
|
||||
app = CalendarSocialApp(__name__)
|
||||
|
Reference in New Issue
Block a user