I am new to flask and I want to add drop down list to a form which has pre defined values(not taking from the DB). I created a model as follows.
class DeliveryDetails(Model):
_tablename_ = 'deliverydetails'
id = Column(Integer, primary_key=True)
customer_name = Column(String(250), nullable=False)
delivery_type = Column(String(250), nullable=False)
And view as follows.
class DeliveryDetailsView(ModelView, DeleteMixin):
datamodel = SQLAInterface(models.DeliveryDetails)
list_columns = ['customer_name','delivery_type']
search_columns = ['customer_name','delivery_type']
edit_columns = ['customer_name','delivery_type']
add_columns = edit_columns
label_columns = {
'customer_name': _("Customer Name"),
'delivery_type': _("Delivery Type") }
I want to show Air, Land, Sea as Delivery Types in a drop down list. please let me know is it possible to do as I mentioned?