def post(self, request, *args, **kwargs): version = self.get_object() revision = version.revision if not (request.user == revision.user or request.user.is_superuser): return http.HttpResponseForbidden('You don\'t have the necessary access rights.') if not version.revision.comment: notify_watching(request.user,verb='made changes to',target=version.object) version.revision.comment = request.POST['comment'] version.revision.save() return http.HttpResponse('ok', content_type='text/plain')
def post(self, request, *args, **kwargs): version = self.get_object() revision = version.revision if not (request.user == revision.user or request.user.is_superuser): return http.HttpResponseForbidden( 'You don\'t have the necessary access rights.') if not version.revision.comment: notify_watching(request.user, verb='made changes to', target=version.object) version.revision.comment = request.POST['comment'] version.revision.save() return http.HttpResponse('ok', content_type='text/plain')
def notify_comment(instance,**kwargs): notify_watching(instance.user,target=instance.object,verb='commented on',action_object=instance)
def notify_stamp(instance,**kwargs): notify_watching(instance.user,target=instance.object,verb='gave feedback on',action_object=instance)
def notify_comment(instance, **kwargs): notify_watching(instance.user, target=instance.object, verb='commented on', action_object=instance)
def notify_stamp(instance, **kwargs): notify_watching(instance.user, target=instance.object, verb='gave feedback on', action_object=instance)