AdminLTE3 Theme for Flask-Admin.
Project description
Flask-AdminLTE3
Flask-AdminLTE3 packages AdminLTE3 into an extension that mostly consists of a blueprint named 'adminlte'. It is Admin Theme for Flask-Admin.
Installation
Installation using pip:
pip install Flask-AdminLTE3
Compatibility
This package is compatible Python versions 2.7, 3.4, 3.5 and 3.6.
Usage
Here is an example:
from flask_adminlte3 import AdminLTE3
[...]
AdminLTE3(app)
Admin Theme for Flask-Admin
from flask_admin.contrib.sqla import ModelView
from flask_admin.contrib.fileadmin import FileAdmin
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')
from flask_admin import Admin
admin = Admin(name='Admin Dashboard',
base_template='myadmin3/my_master.html',
template_mode='bootstrap4',
index_view=MyAdminIndexView())
base template myadmin3/my_master.html code:
{% extends 'flask-admin/base.html' %}
[...]
index template myadmin3/my_index.html code:
{% extends 'myadmin3/my_master.html' %}
[...]
Screenshots
Admin Area:
-
Demo Model :
-
Demo List Model:
-
Demo Creating Model:
-
Demo Editing Model:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-AdminLTE3-1.0.8.tar.gz
(16.9 MB
view details)
Built Distribution
File details
Details for the file Flask-AdminLTE3-1.0.8.tar.gz
.
File metadata
- Download URL: Flask-AdminLTE3-1.0.8.tar.gz
- Upload date:
- Size: 16.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35d9331d63e096c3ce4b288947e1392d70ff14f9ca2e3c567aa69093139a3f4b |
|
MD5 | 8efa338ff3f7a24f0e6880eb7d686a56 |
|
BLAKE2b-256 | e77a046375e46c5dc9bed2a54852cf906e5649da0e0ac0b018e7794c9ed1afe4 |
File details
Details for the file Flask_AdminLTE3-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: Flask_AdminLTE3-1.0.8-py3-none-any.whl
- Upload date:
- Size: 18.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e39bd20070f8f9f6c7f22eb11e4d7df152408c86a5469a0e011e155ab8a8def6 |
|
MD5 | d8f085d6290bb559bbc1f0951b8896f7 |
|
BLAKE2b-256 | 367845159fcd031f2a5378b6247ba42066cc72968e6e2058812347b69231441c |