684 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
46
views
How to achieve two-level dropdown (nested categories) in Flask-Admin?
I’m building an admin console using Flask-Admin and I want my models to appear under a two-level dropdown menu.
For example, in the top menu I want a single item UI.
When I hover/click it, I want a ...
0
votes
1
answer
109
views
Getting AttributeError: 'tuple' object has no attribute 'items' while creating a new item in flask sql alchemy in flask admin
I have created two models in flask-sqlalchemy Product and Brand. Both have a relationship to each other. Whenever I try to create a brand I get the error AttributeError: 'tuple' object has no ...
-1
votes
1
answer
133
views
Debugging admin_base_template undefined using Flask Admin and Flask-security to secure the admin page
Attempting to build a site using Python and Flask. I had made some basic pages before tackling an admin page for the uploading of content. Currently I am using Flask-Admin v 2.0.0a0 and Flask-Security ...
0
votes
1
answer
111
views
How to reorder fields in a Flask-Admin form using an Ajax selector with scaffold_form method?
I created a custom Ajax selector in a Flask-Admin view to optimize search in the birth_city_id field (over 36000 items) using form_ajax_refs (based on How to do an Ajax form field on Flask Admin ...
1
vote
0
answers
66
views
Trouble editing a User Model in a view with Flask-Admin
Upon finishing Miguel's Flask Mega tutorial I tried to implement a quick dashboard to access my model entities stored in a SQLite db through a admin page.
One quick way of doing it (according to some) ...
0
votes
1
answer
214
views
How to create Flask-Admin view basing on SQLAlchemy models
I Have 2 SQLAlchemy models:
class Topic(Base):
__tablename__ = 'topics'
id = mapped_column(Integer, primary_key=True)
name = mapped_column(String(50), unique=True)
**articles = ...
user avatar
user20291246
0
votes
1
answer
39
views
Flask Admin right-align values in table view
Using the Flask Admin package to view database tables, how to right-align the values in the cells? See code below.
class VwSalesByPersonYearView(MyModelView):
"""...
0
votes
1
answer
36
views
How can I restrict access in fields in web aplication with Flask
I'm developing a web application with python/flask.
I want to limit access to some application fields so that only admins have access.
I would like to know if there is a ready-made tool to do this or ...
user avatar
user23059245
0
votes
1
answer
146
views
How to show a JSON value in Flask-Admin as separate fields?
Hi Stackoverflow community,
I'm trying to learn Flask-Admin. The documentation is a very good start, however I've found a very specific use-case that I'm not able to resolve. I have a table in ...
1
vote
2
answers
83
views
Set FLASK_APP after restructuring Flask into package
I cannot set the FLASK_APP variable after restructuring it into a package, it gives an error Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a '...
0
votes
2
answers
453
views
How to change url for Flask-admin
I have a pretty complex Flask site and have added Flask-admin to manage various database tables.
It works just fine but I already have an /admin blueprint tree with lots of management routes and ...
0
votes
0
answers
97
views
How to make horizontal scrollbar always appear on Flask-Admin dashboard regardless of content size?
When there are too many fields, a horizontal scrollbar is needed for scrolling.
(https://i.sstatic.net/CmBcx.png)
But now I'm facing an issue where, when there is too much data, I need to scroll to ...
1
vote
2
answers
943
views
BaseModelView.index_view() got an unexpected keyword argument 'cls'
I am trying to build a Flask app with Flask_security_too and Flask_admin. I need to have 1 user linked to 1 Device, but 1 device can have multiple releases:
class Users(db.Model, UserMixin):
...
0
votes
0
answers
176
views
Flask Admin, SQLAlchemy - Error When Searching a hybrid_property Field in a View
I am using SQLAlchemy with flask_admin and I am trying to search a field with a many-to-one relationship with my root object. Let's say I want to know the starting dates of the employees who work at ...
0
votes
1
answer
67
views
Load flask admin ListView even when a reference field is missing/deleted
I have made two API's with Flask Admin and mongoengine, This is how my document is in the first API.
class Score(db.Document):
score = StringField(required=True)
section= ReferenceField(...