Admin and CMS

Flaxon provides an authenticated model AdminDashboard and an optional schema-driven CMS SPA. The reference UI and JSON APIs cover common back-office workflows.

Bootstrap both panels

from flaxon import Flaxon
from flaxon.admin import AdminConfig, AdminDashboard
from flaxon.admin.cms import CMS, CMSField, ContentType

app = Flaxon("backoffice", debug=True)
admin = AdminDashboard(app,
    config=AdminConfig(site_title="Acme Admin"),
    storage_path="admin.sqlite3",
    users=[{"username": "admin", "password": "change-me"}],
)
cms = CMS(app, url_prefix="/admin/cms", auth=admin.auth)
cms.register(ContentType("post", fields=[CMSField("title", required=True)]))

Run flaxon migrate --direction up for migration-backed storage, then open /admin/login and /admin/cms/. Replace development credentials and enable HTTPS in production.

Capabilities

  • Authentication, CSRF, roles, permissions, users, settings, activity, and model CRUD.
  • CMS content types, statuses, drafts, scheduling fields, revisions, taxonomies, comments, menus, media, and CSV/JSON APIs.
  • Search, filters, sorting, pagination, bulk actions, custom widgets, and hooks.

Extension boundary

Register models with CRUD hooks and content types with CMSField. Use the JSON APIs when building a React, Vue, mobile, or custom Teloce frontend. Use a shared database or Redis-backed session/event store for multiple workers; the in-memory defaults are development-only.

Security checklist

Configure a strong secret, CSRF tokens, login rate limits, MFA, password reset delivery, allowed upload types and sizes, rich-text sanitization, database backups, and audit-log monitoring.