mrjoes / flask-admin

Simple and extensible administrative interface framework for Flask
Other
155 stars 80 forks source link

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

Open maateen opened 8 years ago

maateen commented 8 years ago

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 commented 2 years ago

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