GeniePy comes with built-in support for enabling an internal admin interface backed by starlette-admin.

Description

An internal admin interface lets you quickly manage database records in your application so that (almost) everyone at the company can make edits without requiring any developer effort of any kind.

GeniePy relies on the starlette-admin backed internal admin interface used by Reflex.

Setup

No setup is required. The admin interface is readily accessible at http://localhost:8000/admin.

Configuration

All the admin interface configuration lives inside the rxconfig module.

If you've added a new database table and would like to register it in the admin interface, you would need to register it with Reflex using the enable_admin and admin_dash arguments inside rxconfig.py.

Here's an example configuration for a SubscriptionPlan model:

import reflex as rx

from app.models.subscription_plan import SubscriptionPlan

class AppConfig(rx.Config):
    env_path = ".env"

config = AppConfig(
    app_name="app",
    env=rx.Env.DEV,
    enable_admin=True,
    admin_dash=rx.AdminDash(models=[SubscriptionPlan]),
)

And that's all the configuration you need.