Allow users to list their notifications

This is in very early stage, but at least it works.
This commit is contained in:
2018-07-09 08:32:27 +02:00
parent f1fab33c8d
commit 379a5b1bb0
3 changed files with 116 additions and 9 deletions

View File

@@ -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__)