Skip to main content

Use a string to configure the admins emails setting in your Django Application.

Project description

https://badge.fury.io/py/dj-admins-setting.svg

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):

https://travis-ci.org/hernantz/dj-admins-setting.svg?branch=master https://codecov.io/gh/hernantz/dj-admins-setting/branch/master/graph/badge.svg

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 dj-admins-setting, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size dj_admins_setting-1.0.0-py2.py3-none-any.whl (3.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size dj-admins-setting-1.0.0.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page