Beispiel #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
Beispiel #2
0
 def create(self):
     obj = secure_update_object(
         Poll(),
         self.request.POST
     )
     obj.save()
     return obj
Beispiel #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
Beispiel #4
0
 def create(self):
     obj = secure_update_object(Poll(), self.request.POST)
     obj.save()
     return obj