Reputation: 3488
I am working on Flask admin. Please check the following.
I need to edit the existing record using that edit button shown above.
I need to add a field in edit view whose value appears in the image column shown in the second image.
Any help is appreciable.
Upvotes: 1
Views: 1149
Reputation: 6475
Just add a field in your data model after the Image
field.
class Restaurant(db.Model):
# ...
image = db.Column()
field_extra = db.Column()
In Flask-Admin
, use column_list
to specify the field you want to display:
class RestaurantModelView(ModelView):
column_list = ["id", "title", "course", "image"] # fields list except `field_extra`
Upvotes: 2