Admin Panel for DB with Gino ORM and Sanic (inspired by Flask-Admin)
Project description
gino_admin
Admin Panel for DB with Gino ORM and Sanic (inspired by Flask-Admin)
Work in progress
If you have time and want to fix: Please open issues with that you want to add or write to me in Telegram: @xnuinside or mail: xnuinside@gmail.com
Version 0.0.5 Updates:
1. Upload from CSV: fixed upload from _hash fields - now in step of upload called hash function ( same as in edit, or add per item) 2. Fixed errors relative to datetime fields edit, added datetime_str_formats field to Config object, that allows to add custom datetime str formats. They used in step of convert str from DB to datetime object. 3. Now ‘_hash’ fields values in table showed as ‘*******’ 4. Fixed errors relative to int id’s. Now they works correct in edit and delete. 5. Update Menu template. Now if there is more when 4 models - they will be available under Dropdown menu.
Version 0.0.4 Updates:
Upload from CSV - works, added example to examples/ files. You can upload data from ‘.csv’ tables.
Edit per row - now exist button ‘edit’.
Fixed delete for ALL rows of the model
Fixed delete per element.
Now works full ‘CRUD’.
Fixed auth, now it sets ‘cookie’ and compare user-agent (for multiple users per login)
Limitations
For correct work of Admin Panel all models MUST contain unique ‘id’ field. ‘id’ used to identify row (one element) for Edit & Delete operations.
so if you define model, for example, User:
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.String(), unique=True, primary_key=True)
Supported operations
One user auth
Create item by one for the Model
Delete all rows
Delete one item
Edit existed data
Upload data from csv
TODO:
Select multiple for delete
Edit multiple
Multiple users
Set up data presets (drop table for some data state, defined from csv)
Filters in columns
Actions history
Screens:
Contributions
Contributions and feature requests are very welcome!
Developer guide
Project use pre-commit hooks, so you need setup them
Just run:
pre-commit install
to install git hooks in your .git/ directory.
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
Built Distribution
Hashes for gino_admin-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed9a10346b5f87cca102090458ecbb61a8d261c367a1ba0ba169337328e2091 |
|
MD5 | 68a2f34bbcdef465f19f702937954e3d |
|
BLAKE2b-256 | 37608f3400992aa47eefdfad7d699e8eb8bc6a5ca78c92f4ade77d4119814209 |