Пример #1
0
 def _process_POST(self, name, title, icon):
     self._check_conflict(name)
     feature = RoomFeature(name=name, title=title, icon=icon)
     db.session.add(feature)
     db.session.flush()
     return self._jsonify_one(feature), 201
Пример #2
0
 def to_python(value):
     return RoomFeature.get(value)
Пример #3
0
 def _process_args(self):
     id_ = request.view_args.get('feature_id')
     self.feature = RoomFeature.get_one(id_) if id_ is not None else None
Пример #4
0
 def _process_args(self):
     id_ = request.view_args.get('feature_id')
     self.feature = RoomFeature.get_one(id_) if id_ is not None else None