2012-01-15 19:56:26 +00:00
|
|
|
def is_preview(request):
|
2018-07-22 17:14:27 +00:00
|
|
|
from django.conf import settings
|
|
|
|
return {
|
|
|
|
'jquery_home': settings.JQUERY_HOME,
|
|
|
|
'jquery_ui_home': settings.JQUERY_UI_HOME,
|
2018-07-23 14:02:03 +00:00
|
|
|
'jquery_ui_theme': settings.JQUERY_UI_THEME,
|
2018-07-22 17:14:27 +00:00
|
|
|
'is_preview': settings.IS_PREVIEW,
|
|
|
|
'show_google_analytics': settings.SHOW_GOOGLE_ANALYTICS
|
|
|
|
}
|
|
|
|
|
2012-03-29 19:34:03 +00:00
|
|
|
def count_unseen(request):
|
2018-07-22 17:14:27 +00:00
|
|
|
try:
|
2018-07-24 02:17:05 +00:00
|
|
|
if request.user.is_anonymous:
|
2018-07-22 17:14:27 +00:00
|
|
|
count = 0
|
|
|
|
else:
|
|
|
|
from notification.models import Notice
|
|
|
|
count = Notice.objects.unseen_count_for(request.user)
|
|
|
|
except AttributeError:
|
|
|
|
count = 0
|
|
|
|
return {'unseen_count': count}
|