flask-admin Questions

2

Solved

I have a string field in my SQLAlchemy model and I would like to expose a select box with a few options in Flask-Admin instead of the standard text field. class MyModel(db.Model): id = db.Column(...
Cortese asked 26/6, 2015 at 20:21

1

Solved

I am trying to create a one-to-one relationship between a Department & Ticket table. This way when looking inside of Flask-Admin a user would be able to see the Department name instead of the I...
Unquestionable asked 10/4, 2017 at 20:39

4

Solved

I've built an app with a table called Project which is stored in sqlite, I want allow only super users can view the approve column when creating, editing data. The Project data is retrieved in th...
Choric asked 1/3, 2017 at 8:48

1

Solved

I need to add a custom property of a SQLAlchemy model class to my Flask-Admin view. It does some calculation which I want to display in my column list. class Withdrawal(db.Model): __tablename__...
Arkansas asked 17/1, 2017 at 18:16

2

Solved

Is there a way to limit the size (length/width) of a ModelView column? I am using a WYSIWYG editor and this creates really long text, therefor making the column for the ModelView very long. Here ...
Reynalda asked 10/12, 2016 at 4:55

3

Solved

my Code: __init__.py from flask import Flask from flask_admin import Admin from flask_admin.contrib.sqla import ModelView from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.co...
Toddy asked 1/7, 2015 at 6:36

1

Solved

I'm using Flask-Admin and SQLAlchemy and struggle to create a custom, sortable field in the listview. I a User and a Photo model like this: class User(db.Model): __tablename__ = 'users' id = db....
Fedora asked 6/10, 2016 at 11:44

2

Solved

I've checked the docs and It's pretty vague how the is_accessible method should be implemented. Here is what the docs of flask admin showed class MicroBlogModelView(sqla.ModelView): def is_acce...
Proper asked 11/11, 2015 at 7:46

2

Solved

I develop an application using Flask. I use Postgres db (psycop2), SQLAlchemy and Flask-Admin for admin interface. And I got a problem and can't find a solution. I have many-to-many relationship be...
Bound asked 28/1, 2014 at 21:51

1

Question on flask-admin. I setup flask-admin and one of the models i created is pulling urls and url titles from a mysql database. Using flask-admin, how to i get flask-admin to render the urls ins...
Exciting asked 16/5, 2016 at 16:24

1

Solved

I have Users and Roles in my Flask app thanks to Flask-Security. For some roles I would like to hide certain fields in the forms created by Flask-Admin. I know about customizing ModelViews with e...
Slash asked 30/5, 2016 at 20:5

2

Solved

When using flask-admin, the list view for datetime fields is something like this: "2014-02-22 13:30:43". I'd like to know if is possible to change this default view for something like this: "2014-0...
Yorgen asked 23/2, 2014 at 12:11

1

I want to add filters for amount (custom field) in Model View class FarmerAdmin(ModelView): column_descriptions = dict(amount = "All Transactions Total (Rs.)") column_searchable_list = ('name'...
Crankshaft asked 16/7, 2015 at 14:25

1

Hi there fellow Flask developers! In Flask-admin, I currently try to implement inline model editing into my model view. On the model side, I have a simple tree structure that represents a set of c...
Umbelliferous asked 16/12, 2015 at 13:24

1

Solved

I'm using Flask-Admin 2.1 with Python 2.7.6. One of my Flask-Admin model classes inherits from flask.ext.admin.contrib.sqla.ModelView and overrides form_rules. When I run my application, this war...
Midsection asked 4/12, 2015 at 15:32

2

Solved

I took the Flask-Admin auth example from here and changed it slightly. I added the following block to the view below, but it doesn't show the export button. I was expecting it to add the export op...
Cristinacristine asked 25/3, 2016 at 3:55

2

Solved

I am using flask-admin, and I want to add a dashboard to the home page. I found I can add a new page using: admin = Admin(name='Dashboard', base_template='admin/my_master.html', template_mode='boo...
Aland asked 23/3, 2016 at 2:1

1

I have a Flask application with Flask-SQLAlchemy and Flask-Admin. I would like to perform a batch action, but with form. For example I would like to set a same text value to the form attributed, b...
Syndrome asked 7/3, 2016 at 19:26

3

Solved

What's the right way to get the URL for a flask-admin ModelView? Here's a very simple example: my_admin_view.py from flask.ext.admin.contrib.sqla import ModelView from common.flask_app import ap...
Primogenitor asked 6/12, 2013 at 19:0

1

Solved

I have a Flask-Admin list view (ModelView) of my user model with some fields excluded, custom headers, etc. Everything's working correctly and I've overridden the default list template so I can mat...
Mam asked 11/2, 2016 at 15:20

1

Solved

How can I tell flask-admin to use an alternative representation for Foreign Key Fields such as the following in this RoleUser link table?
Kunstlied asked 10/1, 2016 at 6:25

1

I am trying to use flask-admin, which seems great and easy, but I have a problem. I have a field in a collection which is defined as a ListField(), with an implicit type of None for the list fiel...
Diverticulitis asked 3/3, 2014 at 10:30

1

Solved

Using Flask-Admin + Flask-SQLAlchemy I have defined three models: User, Apikey, Exchange. When an authenticated user creates a new Apikey through the web admin interface I'd like that the user_id ...
Joelie asked 13/12, 2015 at 13:50

1

Solved

Login works great on my standard views, and the admin works great, but i can't seem to add login to my admin/yikes!!! It seems straightforward flask admin docs but when I add this section class M...
Baronetcy asked 21/9, 2015 at 22:23

1

Solved

I am trying to use Flask-Admin to create a create/edit form for the model Matriline shown below. This model has a string field name and a field pod_id with a foreign key constraint to another model...
Ciracirca asked 1/8, 2015 at 17:37

© 2022 - 2024 — McMap. All rights reserved.