Adds notifications

Fixes #70
This commit is contained in:
Mouse Reeve
2020-03-07 14:50:29 -08:00
parent 95c8dc1d67
commit f4008eb8c8
13 changed files with 176 additions and 5 deletions

View File

@ -141,6 +141,15 @@ def register(request):
return redirect('/')
def notifications_page(request):
''' list notitications '''
data = {
'notifications': request.user.notification_set.all().order_by('-created_date')
}
request.user.notification_set.update(read=True)
return TemplateResponse(request, 'notifications.html', data)
def user_page(request, username):
''' profile page for a user '''
content = request.headers.get('Accept')