You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a column in the db that store image_url and in the admin panel I want to show that image in the list and when I want to create new entry I want to upload an image where it stores in s3 bucket, how I can customize the ing tag instead showing the text url in the admin listing
`class Resturant(Base): tablename = "resturants"
id = Column(Integer,primary_key=True, nullable=False)
name = Column(String, nullable=False)
description = Column(String, nullable=False)
published = Column(Boolean, server_default='TRUE', nullable=False)
category_id = Column(Integer, ForeignKey("categories.id"), nullable=False)
Images = Column(ARRAY(String), server_default="{}")
logo = Column(String, nullable=False, server_default="Image Not Found")
menu = Column(String, nullable=False, server_default="PDF")
timings = Column(String, nullable=False, server_default="24h")
location = Column(String, nullable=False, server_default="maps.google.com")
created_at = Column(TIMESTAMP(timezone=True), nullable=False, server_default=text('NOW()'))
`
class ResturantAdmin(ModelView, model=Resturant): column_list = [ Resturant.name, Resturant.logo ]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a column in the db that store image_url and in the admin panel I want to show that image in the list and when I want to create new entry I want to upload an image where it stores in s3 bucket, how I can customize the ing tag instead showing the text url in the admin listing
`class Resturant(Base):
tablename = "resturants"
`
class ResturantAdmin(ModelView, model=Resturant): column_list = [ Resturant.name, Resturant.logo ]
Beta Was this translation helpful? Give feedback.
All reactions