Skip to main content

Extended Settings for Django Project with settings.d/

Project description


Apps for Django to extend global settings with additional files

Initialize other configuration settings for django project Other configurations must be set in /path/to/project/djangoproject/settings.d/*

    |_ apps1/
    |_ ...
    |_ project/
       |_ ...
       |_ settings.d/

The current version of the Django Extended Settings is 1.0.0. It works on Django ≥ 2.0. (not tested other)


Getting the code

The recommended way to install the Django Extended Settings is via pip or pipenv:

$ pip install django-extended-settings


Make sure add extended_settings to your INSTALLED_APPS setting:

    # ...
    # ...

Play settings into your project

Create sub directory settings.d/ into django project directory and put your configuration into independant files with this patterns *

sample : /path/to/project/djangopython/settings.d/

Play database settings

You can add some settings in database

$ ./ migrate

In your python files, you can create settings (in command for example) like this

from extended_settings.models import ExtentedSettings

o = ExtentedSettings() = "My home page location"
o.key = "hostname"
o.value = "http://localhost:8000"

To retrieve settings in your views, ...

from extended_settings.models import ExtentedSettings

my_var = ExtentedSettings.get("hostname")
my_var = ExtentedSettings.get("hostname", 'default value')

my_int = ExtentedSettings.get_int("my-int")
my_bool = ExtentedSettings.get_boolean("my-bool") # True = yes, y, true, 1, ...


The Django Extended Settings is released under the BSD license, like Django itself. If you like it, please consider contributing!

The Django Extended Settings was originally created by Mickael Badet in September 2018.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-extended-settings, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django-extended-settings-1.1.0.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page