https://github.com/hernantz/dj-admins-setting
Use a string to configure the admins emails setting in your Django Application.
https://github.com/hernantz/dj-admins-setting
12-factor-app django settings
Last synced: about 2 months ago
JSON representation
Use a string to configure the admins emails setting in your Django Application.
- Host: GitHub
- URL: https://github.com/hernantz/dj-admins-setting
- Owner: hernantz
- License: mit
- Created: 2019-03-24T19:53:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T15:43:19.000Z (over 7 years ago)
- Last Synced: 2026-03-11T19:37:56.854Z (4 months ago)
- Topics: 12-factor-app, django, settings
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
=================
dj-admins-setting
=================
.. image:: https://badge.fury.io/py/dj-admins-setting.svg
:target: http://badge.fury.io/py/dj-admins-setting
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``:
.. code:: python
import dj_admins_setting
Fetch your admins emails. The default option is fetch them from ``ADMINS``
environment variable:
.. code:: python
ADMINS = dj_admins_setting.config()
Other option is parse an arbitrary emails list string:
.. code:: python
ADMINS = dj_admins_setting.parse('"Support" , "Admins" ')
This will result in a list of tuples like:
.. code:: python
[('Support', 'support@email.com'), ('Admins', 'webmaster@email.com')]
CI status
=========
Development (master):
.. image:: https://travis-ci.org/hernantz/dj-admins-setting.svg?branch=master
:target: http://travis-ci.org/hernantz/dj-admins-setting
.. image:: https://codecov.io/gh/hernantz/dj-admins-setting/branch/master/graph/badge.svg
:target: https://codecov.io/gh/hernantz/dj-admins-setting