Paul's Programming Notes     Archive     Feed     Github

Change Home Flask-Admin

This was the only thing I was able to get working:

Just putting index.html into an admin/ directory wouldn't work.

There's also an even shorter way to do it, for example:
admin = Admin(app, "G-Cal Manager", index_view=AdminIndexView(name='Home', template='admin/home.html', url='/'))

The example above will change the root url to / instead of /admin and it will use home.html from your templates/admin folder.

To fix the 404 errors on your stylesheets after the change, you will also need to change the static_folder in your flask object:
app = Flask(__name__, static_folder='admin')