def update(self, object_id): obj = secure_update_object( get_object_or_404(Poll, pk=object_id), self.request.POST ) obj.save() return obj
def create(self): obj = secure_update_object( Poll(), self.request.POST ) obj.save() return obj
def update(self, object_id): obj = secure_update_object(get_object_or_404(Poll, pk=object_id), self.request.POST) obj.save() return obj
def create(self): obj = secure_update_object(Poll(), self.request.POST) obj.save() return obj