flask-admin Questions
0
Is possible to use column_formatters in edit view in Flask Admin? When I add the following code it is rendering "random" in the list form view. But when it renders the edit view this field is raw n...
Pikeperch asked 15/10, 2018 at 11:55
1
I have a data model which has a column that depends on other column values, following the instructions in this page I've created a context-sensitive function which is used to determine the value of...
Biopsy asked 28/6, 2018 at 5:11
1
Solved
I have three tables in my SQLAlchemy database (using Flask SQLAlchemy): Product, Product variation and Order. I want to see in an order, which product and its variation it includes.
It works well ...
Hailey asked 28/6, 2018 at 19:7
2
Solved
How can I customize field names in create/edit forms in Flask-Admin?
I know how to change the table name:
class User(db.Model):
__tablename__ = 'user'
id = db.Column('user_id', db.Integer, pri...
Apophyge asked 19/9, 2014 at 13:30
1
I'm trying to load a script on a certain ModelView in my admin pages:
class CustomView(ModelView):
# Neither approach works here:
# with current_app.app_context(), current_app.test_request_conte...
Prolamine asked 25/5, 2018 at 14:44
4
Solved
I'm creating a simple blog on Flask and I'm trying to implement Flask-Admin to manage my posts. If I go to the admin area I can see a list of all my post from the DB but when I try to create a new ...
Dwarf asked 22/6, 2013 at 20:9
2
Solved
From what I understand, Flask Admin supports AJAX use for foreign key model loading. The Flask Admin - Model Documentation covers the basics under the heading form_ajax_refs. I have managed to use ...
Svetlana asked 30/6, 2015 at 13:42
1
Solved
I am working on adding flask admin to a preexisting flask boiler plate project. I've been able to get the basic project working at https://github.com/kc1/flask-base (SCREENSHOT). I now need to ad...
Condom asked 12/5, 2018 at 15:48
2
Solved
I'm trying to extend the flask-base project https://github.com/hack4impact/flask-base/tree/master/app. This uses the the application factory pattern in app/init.py and blueprints.
In the app/ini...
Hartzke asked 27/4, 2018 at 22:20
1
Solved
Im using the built-in view of flask admin. As you can see in the picture below:
What Im trying is simple: I just want to extend the dropdown menu with a custom button. This button should perfome ...
Saundrasaunter asked 19/4, 2018 at 12:41
2
Solved
I have a simple model Call and I'm using Flask-Admin to create/edit/delete instances of this model.
One of the field of Call is the path to an audio file. I would like to be able to play the file ...
Ankh asked 29/7, 2015 at 4:53
2
Let's say I have the following models declared:
class Person(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50))
addresses = db.relationship('Address', backr...
Thirtythree asked 10/10, 2016 at 5:19
3
Solved
I've built a system that allows users to apply for code review and wait for manager to approve.
And now what I want to achieve is as below:
If it's approved,
then all the fields become read-o...
Flavescent asked 5/4, 2017 at 5:43
1
I have a Motion model which has many Votes. I display the votes as an inline_model in flask-admin. Is it possible to render the votes as a table like in the list_view template? Instead of like this...
Abbevillian asked 1/3, 2016 at 19:42
4
Solved
I'm looking to secure Web API made using Flask and integrated with flask-admin to provide an admin interface. I searched and found that flask-admin has an admin panel at /admin and by default anyon...
Yasmin asked 27/6, 2015 at 17:44
1
Solved
Is there any way to initiate a pop-up window from a Flask function?
I have a flask-admin + flask-sqlalchemy app. A table in the DB contains a field foo with some values. I have a UserAdmin view an...
Bufflehead asked 1/12, 2017 at 12:14
0
My flask app centers around modifying models based on SQLAlchemy. Hence, I find flask-admin a great plugin because it maps my SQLA models to forms with views already defined with a customizable int...
Schuss asked 24/10, 2017 at 15:9
2
Well, I recently approached to flask-admin and I cannot figure out how to solve this issue. I know that I can use form_choices to restrict the possible values for a text-field by specifying a list ...
Rusell asked 23/4, 2017 at 20:57
1
Solved
I have a problem in the export to csv the tables whose relationship with others, while in the 'simple' work well. I have to add some basis for export?
For example, this is db.Model:
class Categori...
Montano asked 7/4, 2017 at 7:9
5
Solved
How can I make a field on a ModelView readonly?
class MyModelView(BaseModelView):
column_list = ('name', 'last_name', 'email')
Mussman asked 14/2, 2013 at 12:25
2
Solved
I have a Flask-Admin interface to a flask app using SQLAlechemy, and I can't seem to figure out how to handle foreign keys. Specifically, I have the following two models:
class DoctorType(db.Model...
Jessiejessika asked 29/5, 2017 at 22:44
2
I have a problem for which I can't find a simple solution, using Flask-Admin with MongoEngine.
I have a Document class named ExerciseResourceContent. It has a "questions" attribute, which is a List...
Levitate asked 3/4, 2015 at 17:19
0
I already have an application using my SQLAlchemy model, and I'm now trying to add a flask admin website on top to manage some of the data in the DB. This model is already setup and working through...
Epilogue asked 16/5, 2017 at 13:20
1
Solved
I was trying to save a project's reviewer using below, and the select field shows correct:
# Query the user with Role.id == 4 as reviewer
def reviewer_choices():
return User.query.join(User.roles...
Parenthesis asked 11/5, 2017 at 7:21
3
Solved
I have a User model class and password is one attribute among many. I am using Flask web framework and Flask-Admin extension to create the admin view of my model classes. I want to make certain fie...
Teets asked 12/2, 2014 at 11:48
© 2022 - 2024 — McMap. All rights reserved.