Opened 13 years ago

Closed 13 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)

application-settings-holder.diff (1.1 KB ) - added by Matt Magin 13 years ago.
Replacement patch that is properly formatted.

Download all attachments as: .zip

Change History (2)

by Matt Magin, 13 years ago

Replacement patch that is properly formatted.

comment:1 by Russell Keith-Magee, 13 years ago

Resolution: duplicate
Status: newclosed

I'm going to mark this a duplicate of #3591, which is a much more comprehensive approach to the configuration of applications.

Note: See TracTickets for help on using tickets.
Back to Top