class Words(db.Model):
id = db.Column(db.Integer, primary_key = True)
russia = db.Column(db.String(50))
english = db.Column(db.String(50))
buttons = db.Column(db.Text())
def __init__(self, russia=None, english=None, buttons=None):
self.russia = russia
self.english = english
self.buttons = buttons
####### Admin ######### Admin ########## Admin ###########################
admin = Admin(app, name="Demo", template_mode='bootstrap3')
admin.add_view(ModelView(Words, db.session))
###### Models ######### Models ######## Models ###########
class Words(db.Model):
__tablename__ = 'words'
id = db.Column(db.Integer, primary_key = True)
russia = db.Column(db.String(50))
english = db.Column(db.String(50))
buttons = db.Column(db.Text())
def __init__(self, russia=None, english=None, buttons=None):
self.russia = russia
self.english = english
self.buttons = buttons
class Mytools(ModelView):
column_searchable_list = ['russia']
####### Admin ######### Admin ########## Admin ###########################
admin = Admin(app, name="Demo", template_mode='bootstrap3')
admin.add_view(Mytools(Words, db.session))