Expand description
The admin panel — Django Admin, Rust-flavoured.
Re-exports§
pub use audit::ensure_table;pub use audit::for_object;pub use audit::recent;pub use audit::record;pub use audit::ActionType;pub use audit::AdminAction;pub use audit::AuditEvent;pub use audit::LogEntry;pub use bulk::BulkActionContext;pub use bulk::BulkActionFailure;pub use bulk::BulkActionResult;pub use filters::classify_field;pub use filters::field_ui_metadata;pub use filters::field_ui_metadata_with_relation;pub use filters::format_relation_cell;pub use filters::infer_filters;pub use filters::infer_filters_with_relations;pub use filters::mask_pii;pub use filters::FieldRole;pub use filters::FieldUI;pub use filters::FilterDef;pub use filters::FilterKind;pub use modeladmin::BulkAction;pub use modeladmin::Fieldset;pub use modeladmin::ModelAdmin;pub use modeladmin::SortDir;pub use redact::redact_backup_code;pub use redact::redact_mfa_secret;pub use redact::redact_password;pub use redact::redact_token;pub use relations::InverseRelation;pub use relations::RegistryError;pub use relations::RelationRegistry;pub use relations::ResolvedRelation;pub use relations::RELATION_FILTER_DROPDOWN_CAP;
Modules§
- audit
- Admin action log — every create / update / delete driven through
the admin writes a row to
rustio_admin_actions. The audit trail powers two user-visible surfaces: - bulk
- Public surface for project-defined bulk-action dispatch.
- filters
- Field classification + filter inference (renamed from
intelligenceper Section 4 of the strategic reset plan). - modeladmin
ModelAdmin— Django-style customisation surface.- redact
- Sanitisation helpers for log lines, audit summaries, and error messages.
- relations
- Relation Intelligence Layer — runtime registry.
Structs§
- Admin
- Builder for the admin. Register models with
.model::<M>(), then hand it to the router viaregister_admin_routes. - Admin
Entry - Runtime metadata about one admin-registered model. Captures both
the
AdminModelstatic surface and thesuper::ModelAdmincustomisation values at registration time, so handlers read every per-model knob from this struct instead of re-resolving traits. - Admin
Field - Admin
Relation - Admin
Theme - Project-level override patch for the admin chrome palette.
- Cell
Link - One resolved foreign-key cell. The renderer turns this into
<a href="/admin/{admin_name}/{id}/edit">…</a>around the cell’s display label. - EditRow
- The raw field values used to pre-fill the edit form.
- List
Opts - Per-request options for [
AdminOps::list]. Empty /Nonefields mean “framework default”: no ordering override falls back toid DESCinside the runtime, no filters skips the WHERE clause, no limit fetches every row. - List
Page - Result of [
AdminOps::list]: the requested page plus the total row count under the same WHERE clause (so handlers can render pagination footers without a separate query). - ListRow
- A row as shown on the list page.
- Site
Branding - Per-project admin branding — the user-facing identity layer.
- User
Profile Row - One key-value row inside a
UserProfileSection. Both fields areStringso projects can format whatever shape they need. Rendered escaped — pass plain text; for arbitrary HTML, projects override the template block instead. - User
Profile Section - One labeled section rendered in the project-extension area of the
built-in user profile page (admin/user_view.html —
{% block project_user_fields %}). A project’s extension closure returnsVec<UserProfileSection>so it can contribute multiple disjoint areas in a single registration.
Enums§
Traits§
- Admin
Model - What the
#[derive(RustioAdmin)]macro produces for each struct.