Open kc1 opened 6 years ago
Flask-Admin automatically creates a blueprint. When you do this: app.register_blueprint(admin_blueprint, url_prefix='/admin')
you are creating a second blueprint named 'admin'.
In your last URL why is it 127.0.0.1:5000/db/db
instead of 127.0.0.1:5000/db
?
I'm trying to add flask-admin to the project:
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.
I'm struggling to get the most basic functionality working so now I'm trying to follow https://flask-admin.readthedocs.io/en/v1.1.0/_sources/quickstart.txt
In the app/init.py I have:
templates/admin/db.html:
To the admin views (https://github.com/hack4impact/flask-base/blob/master/app/admin/views.py) I've added :
When I open:
I get:
What am I doing wrong?
edit:
I changed to:
However if I try:
I get a 404. I'm assuming you are changing the normal base admin route from 'admin'to 'db'
What now?