示例#1
0
 def post(self, request, *args, **kwargs):
     if request.is_ajax():
         print self.request.user.username
         clear_notifications_template_cache(request.user.username)
         return self.render_json_response({'result': 'ok'})
     return HttpResponseForbidden()
示例#2
0
 def post(self, request, *args, **kwargs):
     Message.objects.filter(user=request.user).update(read=True)
     clear_notifications_template_cache(request.user.username)
     return redirect(request.POST.get('next', '/'))
示例#3
0
 def post(self, request, *args, **kwargs):
     if request.is_ajax():
         print self.request.user.username
         clear_notifications_template_cache(request.user.username)
         return self.render_json_response({'result': 'ok'})
     return HttpResponseForbidden()
示例#4
0
def persistent_message_post_save(sender, instance, **kwargs):
    clear_notifications_template_cache(instance.user.username)
示例#5
0
 def post(self, request, *args, **kwargs):
     Message.objects.filter(user = request.user).update(read = True)
     clear_notifications_template_cache(request.user.username)
     return redirect(request.POST.get('next', '/'))