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.

Source Distribution

dj-admins-setting-1.0.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

dj_admins_setting-1.0.0-py2.py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page