Skip to content

Rearchitect the logic for registering models & model features #15042

Closed
@jeremystretch

Description

@jeremystretch

Proposed Changes

Currently, NetBox automatically registers all models and their features by hooking into Django's class_prepared signal. This issue proposes moving the registration triggers into the ready() method of the AppConfig class for each app.

Justification

Although the current approach has generally worked well, issues arose while introducing a custom user model under #12795. Because Django must load the (now custom) user model before the signal handler, we must reorder the logic. This will also enable cleaner separation of functions.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end user

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions