Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template folder confliction between flask-admin and flask blueprint #21

Open
maateen opened this issue Jan 9, 2016 · 1 comment
Open

Comments

@maateen
Copy link

maateen commented Jan 9, 2016

First of all I like to show you my test project skeleton:

app.py
app/
|--mysite/
|--------__init__.py
|--------models.py
|--------views.py
|--------templates/
|-----------------index.html
|--admin/
|--------__init__.py
|--------models.py
|--------views.py
|--------templates/
|-----------------editor.html

In app.py, the codes are like below:

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin

app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)

Now, please let me make something clear. In mysite folder I'll make a flask blueprint, which has a template file index.php in templates folder. After that, I'll try to make an admin folder to initialize flask-admin admin object. This folder also has a templates folder. I like to override flask-admin base templates with the editor.html template in regarding templates folder. When I try, the flask-admin admin object only check in the blueprint templates folder. But I need different templates folder for mysite and admin. Any example for this, please?

@sajuvs
Copy link

sajuvs commented Dec 19, 2021

Same problem I have... flask documentation sucks...one leads to another and there is no head and tail..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants