Skip to content

Admin : Register Custom Pages and routes via an Admin URL resolver #18

Open
@VaZark

Description

@VaZark

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

Have an abstract view AdminPage (like ModelAdmin) that can be used to register Views on the admin and leverage the admin's default permission model.

These views should then be wired up to an adminUrlPatterns. This should make it significantly easier to build custom dashboards using Django without having to reach for external options like React-Admin and rewiring the APIs all over again

Problem

Django's admin is one of its most distinguishing features.

In the past, I attempted to leverage the admin interface to build internal pages, as it provided many of the features typically required for an internal site. However, it quickly became clear that Django's admin was designed primarily for database management and not for broader site functionality.

As a result, we were compelled to build a separate admin dashboard using other front-end technologies, such as React, on top of the existing API.

Building able to register custom pages easily would save a lot of dev time for smaller teams and independent devs.

Request or proposal

request

Additional Details

The existing ticket on Trac points to AdminPlus, which aims to just add a view and hook it into the index under an app.

This proposal intends to put the AdminPage on equal footing and not need to be registered under an app to exist. It should be able to exist under its own heading or fall back to some default (like 'Pages')

This should make it easier for packages that offer a custom dashboard experience to build on top of django-admin instead of recommending abandoning the core feature completely, or having two separate backoffices (like wagtail) instead of just hiding some views with appropriate perms

Implementation Suggestions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions