def create_model(self, form): model = Model(self.last_id) self.last_id += 1 form.populate_obj(model) self.created_models.append(model) self.all_models[model.id] = model return True
def update_model(self, form, model): form.populate_obj(model) self.updated_models.append(model) return True