Example #1
0
 def update(self, object_id):
     obj = secure_update_object(
         get_object_or_404(Poll, pk=object_id),
         self.request.POST
     )
     obj.save()
     return obj
Example #2
0
 def create(self):
     obj = secure_update_object(
         Poll(),
         self.request.POST
     )
     obj.save()
     return obj
Example #3
0
 def update(self, object_id):
     obj = secure_update_object(get_object_or_404(Poll, pk=object_id),
                                self.request.POST)
     obj.save()
     return obj
Example #4
0
 def create(self):
     obj = secure_update_object(Poll(), self.request.POST)
     obj.save()
     return obj