Add option to import custom configuration from configuration.py #8874

Closed
opened 2025-12-29 20:42:24 +01:00 by adam · 2 comments
Owner

Originally created by @drobnymichal on GitHub (Nov 23, 2023).

NetBox version

v3.6.5

Feature type

New functionality

Proposed functionality

Add the ability to import settings from configuration.py other than what is defined in settings.py.

Use case

I am developing a new NetBox plugin that adds some middleware to NetBox. This middleware requires a special configuration, which it looks for in the settings.py file.

In our organization, we have solved this by editing the settings.py file directly. However, this is impossible from a sustainability point of view because this file is changed between releases.

Database changes

None.

External dependencies

None.

Originally created by @drobnymichal on GitHub (Nov 23, 2023). ### NetBox version v3.6.5 ### Feature type New functionality ### Proposed functionality Add the ability to import settings from configuration.py other than what is defined in settings.py. ### Use case I am developing a new NetBox plugin that adds some middleware to NetBox. This middleware requires a special configuration, which it looks for in the settings.py file. In our organization, we have solved this by editing the settings.py file directly. However, this is impossible from a sustainability point of view because this file is changed between releases. ### Database changes None. ### External dependencies None.
adam added the type: feature label 2025-12-29 20:42:24 +01:00
adam closed this issue 2025-12-29 20:42:24 +01:00
Author
Owner

@abhi1693 commented on GitHub (Nov 23, 2023):

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@abhi1693 commented on GitHub (Nov 23, 2023): Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md), a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.
Author
Owner

@jeremystretch commented on GitHub (Nov 27, 2023):

I'll go ahead and nip this in the bud: We aren't going to allow arbitrary modifications to the content of settings.py. To do so would be extremely irresponsible and open the application to myriad potential issues.

However, this is impossible from a sustainability point of view because this file is changed between releases.

If by "impossible," you mean it would impose a slight burden on you, then yes. But if you need to modify core settings to accommodate some third party software, I'm afraid that yes, you'll need to be responsible for testing and maintaining those changes over time.

@jeremystretch commented on GitHub (Nov 27, 2023): I'll go ahead and nip this in the bud: We aren't going to allow arbitrary modifications to the content of `settings.py`. To do so would be extremely irresponsible and open the application to myriad potential issues. > However, this is impossible from a sustainability point of view because this file is changed between releases. If by "impossible," you mean it would impose a slight burden on you, then yes. But if you need to modify core settings to accommodate some third party software, I'm afraid that yes, you'll need to be responsible for testing and maintaining those changes over time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8874