Replace the Django admin UI #4938

Closed
opened 2025-12-29 19:22:27 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 21, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.3

Feature type

New functionality

Proposed functionality

NetBox currently relies on Django's built-in administrative UI to manage the following objects:

  • Custom fields
  • Custom links
  • Export templates
  • Webhooks
  • User keys (deprecated)
  • Users
  • Groups
  • Permissions
  • REST API tokens

The admin UI also provides an interface into job results, background tasks, and installed plugins.

This issue proposes replicating the necessary views within the main NetBox UI and eliminating our dependence on the Django admin UI entirely.

Use case

While the Django admin UI is an incredibly powerful and valuable tool, we have reached the point in NetBox development where we no longer need to rely on it. Providing our own views to manage these objects provides a more consistent user experience and eliminates an extra dimension of standardization and testing.

Database changes

No response

External dependencies

No response

Originally created by @jeremystretch on GitHub (May 21, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.3 ### Feature type New functionality ### Proposed functionality NetBox currently relies on Django's built-in administrative UI to manage the following objects: - Custom fields - Custom links - Export templates - Webhooks - User keys (deprecated) - Users - Groups - Permissions - REST API tokens The admin UI also provides an interface into job results, background tasks, and installed plugins. This issue proposes replicating the necessary views within the main NetBox UI and eliminating our dependence on the Django admin UI entirely. ### Use case While the Django admin UI is an incredibly powerful and valuable tool, we have reached the point in NetBox development where we no longer need to rely on it. Providing our own views to manage these objects provides a more consistent user experience and eliminates an extra dimension of standardization and testing. ### Database changes _No response_ ### External dependencies _No response_
adam added the status: acceptedtype: feature labels 2025-12-29 19:22:27 +01:00
adam closed this issue 2025-12-29 19:22:27 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 15, 2021):

While we can move the NetBox components to their own views, we might still want to keep the Django admin UI around for two reasons.

First, we use Django's stock User and Group models from django.contrib.auth, which don't fit the pattern of determining e.g. URL paths from a model's app_label. While we can employ proxy models to work around this in some cases, this doesn't address all potential conflicts. And unfortunately, moving to a custom user model would be quite a headache.

Second, some NetBox plugins rely on the Django admin UI for administration of their own models. Indeed, it is currently a documented feature of the plugins API. I'm not sure we want to give that up.

Maybe we should scale back the scope of this proposal to just focus on moving out the "NetBox stuff" (custom fields, etc.) into standard views. Thoughts?

@jeremystretch commented on GitHub (Jun 15, 2021): While we can move the NetBox components to their own views, we might still want to keep the Django admin UI around for two reasons. First, we use Django's stock User and Group models from `django.contrib.auth`, which don't fit the pattern of determining e.g. URL paths from a model's `app_label`. While we can employ proxy models to work around this in some cases, this doesn't address all potential conflicts. And unfortunately, moving to a custom user model would be [quite a headache](https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project). Second, some NetBox plugins rely on the Django admin UI for administration of their own models. Indeed, it is currently a [documented feature](https://netbox.readthedocs.io/en/stable/plugins/development/#using-the-django-admin-interface) of the plugins API. I'm not sure we want to give that up. Maybe we should scale back the scope of this proposal to just focus on moving out the "NetBox stuff" (custom fields, etc.) into standard views. Thoughts?
Author
Owner

@ziggekatten commented on GitHub (Jun 16, 2021):

Completely agree. Mostly as moving away from current admin would wreck alot of our scripts and integrations. Probably all of them.....

@ziggekatten commented on GitHub (Jun 16, 2021): Completely agree. Mostly as moving away from current admin would wreck alot of our scripts and integrations. Probably all of them.....
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4938