Opened 14 years ago
Closed 14 years ago
#16628 closed New feature (duplicate)
Provide a class to hold application-based settings
| Reported by: | Matt Magin | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Other) | Version: | 1.3 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When developing a portable application it would be useful to have a simple way to access the project settings first and fall back to an application-based settings module for defaults.
Application developers can create a settings.py module in the application and instantiate settings using the ApplicationSettingsHolder.
Example:
__init__.py:
from django.conf import ApplicationSettingsHolder settings = ApplicationSettingsHolder('myapp.settings')
access settings with:
from myapp import settings
Attachments (1)
Change History (2)
by , 14 years ago
| Attachment: | application-settings-holder.diff added |
|---|
comment:1 by , 14 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
I'm going to mark this a duplicate of #3591, which is a much more comprehensive approach to the configuration of applications.
Replacement patch that is properly formatted.