Exemple #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()
Exemple #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', '/'))
Exemple #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()
Exemple #4
0
def persistent_message_post_save(sender, instance, **kwargs):
    clear_notifications_template_cache(instance.user.username)
Exemple #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', '/'))