Ejemplo n.º 1
0
 def form_valid(self, form):
     response = super().form_valid(form)
     send_action(self.request.user,
                 'created the person',
                 target=self.object)
     return response
Ejemplo n.º 2
0
 def form_valid(self, form):
     album = form.save()
     self.success_url = album.get_absolute_url()
     action = 'added {} photos to the album'.format(form.photo_count)
     send_action(self.request.user, action, target=album)
     return super().form_valid(form)
Ejemplo n.º 3
0
 def form_valid(self, form):
     response = super().form_valid(form)
     send_action(self.request.user, 'created the person', target=self.object)
     return response
Ejemplo n.º 4
0
 def form_valid(self, form):
     album = form.save()
     self.success_url = album.get_absolute_url()
     action = 'added {} photos to the album'.format(form.photo_count)
     send_action(self.request.user, action, target=album)
     return super().form_valid(form)