Use a string to configure the admins emails setting in your Django Application.
Project description
This utility is based on dj-database-url by Kenneth Reitz.
It allows to utilize the 12factor inspired environments variable to configure the ADMINS emails list in a Django application.
Usage
Import the package in settings.py:
import dj_admins_setting
Fetch your admins emails. The default option is fetch them from ADMINS environment variable:
ADMINS = dj_admins_setting.config()
Other option is parse an arbitrary emails list string:
ADMINS = dj_admins_setting.parse('"Support" <support@email.com>, "Admins" <webmaster@email.com>')
This will result in a list of tuples like:
[('Support', 'support@email.com'), ('Admins', 'webmaster@email.com')]
CI status
Development (master):
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dj-admins-setting-1.0.0.tar.gz
.
File metadata
- Download URL: dj-admins-setting-1.0.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac87f5973a609a1f701ece92f3c1a5cefe5e23dbfd8cd1865a673796a8fdf215 |
|
MD5 | c107ce9f7fb118b97a10ddfcc07a27cc |
|
BLAKE2b-256 | bfee3c15bf24e0fc4577920cd87e46d3b53f787bf577369efb443ecc2383a315 |
File details
Details for the file dj_admins_setting-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: dj_admins_setting-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45ac5113f9885eda36b9d795efd0566becd94a2ab380ee4aebbe50fb6e627c6c |
|
MD5 | 70900b1eaf9c9a30f71c6aad43ae909e |
|
BLAKE2b-256 | 264a03f294d1b535b93ae1feb338bd5c9105c19ba3a0b0c246e542edf5d12daa |