Skip to main content

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 :model screenshot

  • Demo List Model: model list

  • Demo Creating Model: model create

  • Demo Editing Model: model edit

Project details


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.7.tar.gz (16.9 MB view details)

Uploaded Source

Built Distribution

Flask_AdminLTE3-1.0.7-py3-none-any.whl (18.2 MB view details)

Uploaded Python 3

File details

Details for the file Flask-AdminLTE3-1.0.7.tar.gz.

File metadata

  • Download URL: Flask-AdminLTE3-1.0.7.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

Hashes for Flask-AdminLTE3-1.0.7.tar.gz
Algorithm Hash digest
SHA256 42756becadab36a424014fa3431dc7003df5a3ead7e7dc95943a7e0e1cc2ad75
MD5 f9d238c2ba25e74c9ed6e15fc74aa355
BLAKE2b-256 e90c0f642dcf70903c6ed51fa040046d6856233d2f6052d7e93b6584f9b9aa55

See more details on using hashes here.

File details

Details for the file Flask_AdminLTE3-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: Flask_AdminLTE3-1.0.7-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

Hashes for Flask_AdminLTE3-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 de3c03d42ffe60186a3c765e32cae7f65030cc04ff18a3bc3d786c9405eed0c4
MD5 94f7617876a465b204c5eb7c4a864086
BLAKE2b-256 b756244de589bd6677aa6a914185ba6ee02a35433c237f23d929f8c2ff5a47c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page