Allow amending of INSTALLED_APPS and MIDDLEWARE #1320

Closed
opened 2025-12-29 16:31:25 +01:00 by adam · 2 comments
Owner

Originally created by @Ichabond on GitHub (Oct 17, 2017).

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.2.1

Description

settings.py currently imports several optional settings from configuration.py, but this does not include INSTALLED_APPS and MIDDELWARE. Adding this functionality would make customisation (such as monkey patching) of Netbox a whole lot easier, without having to modify settings.py, making sure this file remains consistent with upstream.
The change should only require a minor rewrite of settings.py. eg: INSTALLED_APPS = INSTALLED_APPS + getattr(EXTENDED_APPS, configuration, ()), the equivalent action for MIDDLEWARE

Originally created by @Ichabond on GitHub (Oct 17, 2017). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. If none of the below apply, please raise your issue for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. ---> ### Issue type [x] Feature request <!-- Requesting the implementation of a new feature --> [ ] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) --> ### Environment * Python version: 3.5.2 * NetBox version: 2.2.1 <!-- BUG REPORTS must include: * A list of the steps needed to reproduce the bug * A description of the expected behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description settings.py currently imports several optional settings from `configuration.py`, but this does not include `INSTALLED_APPS` and `MIDDELWARE`. Adding this functionality would make customisation (such as monkey patching) of Netbox a whole lot easier, without having to modify `settings.py`, making sure this file remains consistent with upstream. The change should only require a minor rewrite of `settings.py`. eg: `INSTALLED_APPS = INSTALLED_APPS + getattr(EXTENDED_APPS, configuration, ())`, the equivalent action for `MIDDLEWARE`
adam closed this issue 2025-12-29 16:31:25 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 17, 2017):

While users are welcome to fork the project to extend it for their own needs, this isn't something we're going to actively encourage in the master code base. NetBox is packaged as a cohesive application, and is not intended to be modified arbitrarily.

@jeremystretch commented on GitHub (Oct 17, 2017): While users are welcome to fork the project to extend it for their own needs, this isn't something we're going to actively encourage in the master code base. NetBox is packaged as a cohesive application, and is not intended to be modified arbitrarily.
Author
Owner

@ferringb commented on GitHub (Oct 17, 2017):

Offhand, there is a difference between 'encouraging' and 'making it a pain to do'. Django app wise, it's semi standard to make it possible for people to add apps if they need it- sentry for example, does exactly this, and is "packaged as a cohesive application".

Other projects have found a way to accomplish what you're intending, while also protecting their time (IE, not having to debug some random broken application).

I'd strongly ask you to reconsider, and instead we work out a way that everyone is happy. Forking the codebase for adding internal only functionality isn't going to make users lives 'fun', nor is it great for the netbox ecosystem.

@ferringb commented on GitHub (Oct 17, 2017): Offhand, there is a difference between 'encouraging' and 'making it a pain to do'. Django app wise, it's semi standard to make it possible for people to add apps if they need it- sentry for example, does exactly this, and is "packaged as a cohesive application". Other projects have found a way to accomplish what you're intending, while also protecting their time (IE, not having to debug some random broken application). I'd strongly ask you to reconsider, and instead we work out a way that everyone is happy. Forking the codebase for adding internal only functionality isn't going to make users lives 'fun', nor is it great for the netbox ecosystem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1320