Comments (11)
Error:
FLASK_APP=apps flask run
* Serving Flask app "apps"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Usage: flask run [OPTIONS]
Error: While importing "apps", an ImportError was raised:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 240, in locate_app
__import__(module_name)
File "/Users/paulo/Downloads/Flask-AdminLTE3-master/sample_application/apps/__init__.py", line 3, in <module>
from apps.extensions import adminlte, adminlte_base
File "/Users/paulo/Downloads/Flask-AdminLTE3-master/sample_application/apps/extensions.py", line 5, in <module>
from flask_adminlte3_base import AdminLTE3Base
ModuleNotFoundError: No module named 'flask_adminlte3_base'
from flask-adminlte3.
https://github.com/shijl-0925/Flask-AdminLTE3-Base
from flask-adminlte3.
pip install Flask-AdminLTE3-Base
ERROR: Could not find a version that satisfies the requirement Flask-AdminLTE3-Base (from versions: none)
ERROR: No matching distribution found for Flask-AdminLTE3-Base
from flask-adminlte3.
It is very confuse.
I have the code:
adminlte = AdminLTE3(flask)
adminlte_base = AdminLTE3Base(flask)
admin = Admin(flask, template_mode='bootstrap3')
It work but with bootstrap3. If i set bootstrap4 it show error message that template not found.
from flask-adminlte3.
I tried it too, but same error:
# admin
adminlte = AdminLTE3(flask)
adminlte_base = AdminLTE3Base(flask)
class AdminLTEModelView(ModelView):
list_template = 'flask-admin/model/list.html'
create_template = 'flask-admin/model/create.html'
edit_template = 'flask-admin/model/edit.html'
details_template = 'flask-admin/model/details.html'
create_modal_template = 'flask-admin/model/modals/create.html'
edit_modal_template = 'flask-admin/model/modals/edit.html'
details_modal_template = 'flask-admin/model/modals/details.html'
class AdminLTEFileAdmin(FileAdmin):
list_template = 'flask-admin/file/list.html'
upload_template = 'flask-admin/file/form.html'
mkdir_template = 'flask-admin/file/form.html'
rename_template = 'flask-admin/file/form.html'
edit_template = 'flask-admin/file/form.html'
upload_modal_template = 'flask-admin/file/modals/form.html'
mkdir_modal_template = 'flask-admin/file/modals/form.html'
rename_modal_template = 'flask-admin/file/modals/form.html'
edit_modal_template = 'flask-admin/file/modals/form.html'
class MyAdminIndexView(AdminIndexView):
@expose('/', methods=['GET', 'POST'])
def index(self):
return self.render('myadmin3/my_index.html')
class MyBaseModelview(AdminLTEModelView):
page_size = 50 # the number of entries to display on the list view
can_export = True
can_view_details = True
# edit_modal = True
# create_modal = True
# details_modal = True
admin = Admin(name='Admin Dashboard',
base_template='myadmin3/my_master.html',
template_mode='bootstrap4',
index_view=MyAdminIndexView())
admin.add_link(MenuLink(name='Back Home', class_name='nav-item', endpoint='index.index_home'))
admin.init_app(flask)
from flask-adminlte3.
The problem is with flask-admin bootstrap4 that was not release.
How to install it?
from flask-adminlte3.
I tried:
pip install git+https://github.com/flask-admin/flask-admin.git@bootstrap4
But get:
ImportError: cannot import name 'secure_filename' from 'werkzeug' (/usr/local/lib/python3.8/site-packages/werkzeug/init.py)
from flask-adminlte3.
Solution is:
replato imports from flask admin to:
from werkzeug.utils import secure_filename
But it get other error:
jinja2.exceptions.TemplateNotFound: myadmin3/my_index.html
But i copy your templates folder to my root folder of app
from flask-adminlte3.
i make it work. i need set template folder as "../template" because my app class is inside a folder
from flask-adminlte3.
pip install git+https://github.com/flask-admin/flask-admin.git@bootstrap4
pip install Werkzeug==0.15.4
please try it.
from flask-adminlte3.
Hi,
is the flask admilte3 base still active?
https://github.com/shijl-0925/Flask-AdminLTE3-Base unable to access base.html from flask adminlte3 base
is the base included in flask-Adminlte3?
from flask-adminlte3.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-adminlte3.