예제 #1
0
파일: views.py 프로젝트: alexef/kit
 def form_valid(self, form):
     self.object = form.save()
     text = 'New comment: \n\n' + self.object.text
     Comment.alert(self.object.issue, self.user, text)
     return HttpResponseRedirect(self.get_success_url())
예제 #2
0
파일: views.py 프로젝트: alexef/kit
 def form_valid(self, form):
     self.object = form.save()
     text = 'Created new %s: %s\n\n%s' % (self.object.tracker, self.object.title, self.object.text)
     Comment.alert(self.object, self.user, text, new=True)
     return HttpResponseRedirect(self.object.get_absolute_url())