Ejemplo n.º 1
0
 def put(self, id):
     form = ColumnCreateForm()
     if not form.validate_on_submit():
         return form.errors, 422
     column = Column.query.filter_by(id=id).first()
     column.name = form.name.data
     column.description = form.description.data
     db.session.commit()
     return ColumnSerializer(column).data, 201
Ejemplo n.º 2
0
 def put(self, id):
     form = ColumnCreateForm()
     if not form.validate_on_submit():
         return form.errors, 422
     column = Column.query.filter_by(id=id).first()
     column.name = form.name.data
     column.description = form.description.data
     db.session.commit()
     return ColumnSerializer(column).data, 201
Ejemplo n.º 3
0
 def post(self):
     form = ColumnCreateForm()
     if not form.validate_on_submit():
         return form.errors, 422
     column = Column(form.name.data, form.description.data)
     column.tasks = []
     db.session.add(column)
     db.session.commit()
     return ColumnSerializer(column).data, 201
Ejemplo n.º 4
0
 def post(self):
     form = ColumnCreateForm()
     if not form.validate_on_submit():
         return form.errors, 422
     column = Column(form.name.data, form.description.data)
     column.tasks = []
     db.session.add(column)
     db.session.commit()
     return ColumnSerializer(column).data, 201