Skip to main content

Flask-Admin-Panel

A Flask extension that enables Admin Panel for Registed Flask-SQLAlchemy Models.

Example

Setting up the Flask-Admin-Panel is simple:

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin_panel import FlaskAdminPanel

app = Flask(__name__)
app.config["SECRET_KEY"] = "<replace with a secret key>"
app.config["APP_ADMIN_USER"] = "<replace with a your user name default is admin>"
app.config["APP_ADMIN_PASSWORD"] = "provide a strong password"
app.config["SQLALCHEMY_DATABASE_URI"] = "provide a sql alchemy database uri"

db = SQLAlchemy(app)

adminpanel = FlaskAdminPanel(app,db)

Registring the models to Flask-Admin-Panel :

#Create any model
class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(80), unique=True, nullable=False)
    email = db.Column(db.String(120), unique=True, nullable=False)

    def __repr__(self):
        return '<User %r>' % self.username

# Provide unique name to model and SQLAlchemy.Model class
adminpanel.serv_admin_panel.register_model_for_admin_panel("User",User) 

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_admin_panel-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_admin_panel-0.1.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file flask_admin_panel-0.1.0.tar.gz.

File metadata

  • Download URL: flask_admin_panel-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.3

File hashes

Hashes for flask_admin_panel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffe3281d2622c2704e0f9353150f92a52f67cc6d46bee3692007d7fb2e3b29e8
MD5 7164bbb8657f4625dcf1de35fcbbec4f
BLAKE2b-256 f74cd0996b796b7ca40fd7023b28fe6d60dbb2e20e5e04e3ebc513ad31ccdf2f

See more details on using hashes here.

File details

Details for the file flask_admin_panel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_admin_panel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf02556aa55c32313f0b23ce64d2457edc757a8d3276102b70163211d0e04c0
MD5 7a773f064d94c8b70b83830167d750cc
BLAKE2b-256 31e7c18bbb054fcda66b8b80953b67c38ddcd286fc44d89c0f60a8c8c98860d8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page