Skip to main content

Yet Another Settings tool for django contains helper functions for managing localized settings files for different deployments and developers.

Installation

$ pip install django-yaset

Usage

A common pattern in django to use different settings for different environments is to have a “local_settings” directory. This utility makes this easier.

The expected directory setup is as follows:

project/
    settings.py
    local_settings/
        __init__.py
        import_redirect
        development.py
        production.py
        secrets/
            __init__.py
            development.py
            production.py

The import_redirect file should contain the local module name of the settings to import in this environment. In the above example, it would be either “development” or “production”. The “devleopment” and “production” files would contain the same types of declarations found in settings.py.

Inside of your settings.py file, include this at the bottom:

from yaset import import_settings

import_settings(globals())

This passes the settings packaging into the import_settings call which loads import_redirect, uses its contents to then load the local_settings and local_settings.secrets files specified.

It is not generally recommended to put either the import_redirect file or the secrets directory in your repository.

Supports

django-yaset has been tested with:

  • Django 2.2.3 using Python 3.6, 3.7

Docs & Source

Docs: http://django-yaset.readthedocs.io/en/latest/

Source: https://github.com/cltrudeau/django-yaset

Release files for django-yaset 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-yaset 0.2.0
File Size Uploaded
django-yaset-0.2.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-yaset 0.2.0
File Interpreter ABI Platform
django_yaset-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 14.1 kB

Release files / django-yaset-0.2.0.tar.gz

Download URL django-yaset-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba44afade98bc9b58572fe9aa0441183eeca8ef87c1775384acdb64e5bbbb3d8
BLAKE2b-256 checksum
How to use checksums
0da0e4e3e18a6d45519748e987c3ba737ea58fc921131edf516229a41e25249f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

Release files / django_yaset-0.2.0-py2.py3-none-any.whl

Download URL django_yaset-0.2.0-py2.py3-none-any.whl
Size 8.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d54417aa0413bb4e8ff2914b2e048234a1c3e4e96dcfb607934aeeee4b18a1e2
BLAKE2b-256 checksum
How to use checksums
b84ddbcda3ecb759e70b0076749ffa7a08ac6137df83c0081b6729bdd6e10426
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page