1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

Add notification at info-bar, and fix bug in visiting register/login page when user is already logged in.

This commit is contained in:
xiez
2012-06-04 21:27:32 +08:00
parent 28dbc2ad73
commit f9c72b57a4
17 changed files with 286 additions and 5 deletions

11
notifications/utils.py Normal file
View File

@@ -0,0 +1,11 @@
from django.core.cache import cache
from seahub.notifications.models import Notification
def refresh_cache():
"""
Function to be called when change primary notification.
"""
cache.set('CUR_TOPINFO', Notification.objects.all().filter(primary=1),
24*60*60)