Coder Social home page Coder Social logo

muffin-admin's Introduction

Muffin-Admin

Muffin-Admin -- an extension to Muffin that implements admin-interfaces

Tests Status

PYPI Version

Python Versions


image

Features

Requirements

  • python >= 3.8

Installation

Muffin-Admin should be installed using pip: :

pip install muffin-admin

With SQLAlchemy Core support: :

pip install muffin-admin[sqlalchemy]

With Peewee ORM support: :

pip install muffin-admin[peewee]

Usage

Initialize the admin:

Initialize admin handlers (example for Peewee ORM):

Connect admin to an Muffin application:

Authentication

Decorate an authentication function with admin.check_auth:

Register a function to return user's information:

Implement a login handler for standart react-admin auth page:

For futher reference check https://github.com/klen/muffin-admin/tree/develop/examples <examples> in the repository.

Custom Actions

Configuration options

Name Default value Description
prefix "/admin" Admin's HTTP URL prefix
title "Muffin Admin" Admin's title
main_js_url "{prefix}/main.js" A link to main JS file
custom_js_url "" A link to custom JS file
custom_css_url "" A link to custom CSS file
login_url None An HTTP URL for your custom login page
logout_url None An HTTP URL for your custom logout page
menu_sort True Sort menu items
auth_storage "localstorage" Where to keep authorization information (localstorage|cookies)
auth_storage_name muffin_admin_auth Localstorage/Cookie name for authentication info
app_bar_links [{'url': '/', 'icon': 'Home', 'title': 'Home'}] Appbar links
mutation_mode "optimistic" React-Admin edit mutation mode (pessimisticundoable)

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/muffin-admin/issues

Contributing

Development of Muffin-Admin happens at: https://github.com/klen/muffin-admin

Contributors

  • klen (Kirill Klenov)

License

Licensed under a MIT license.

muffin-admin's People

Contributors

dependabot[bot] avatar klen avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lowks evgenychich

muffin-admin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.