Skip to main content

Django project configuration helpers

Project description

Django-Confy
~~~~~~~~~~~~

Comfy config for Django

Actually this code is just `django-dotenv <https://github.com/jacobian-archive/django-dotenv>`_, `django-getenv <https://github.com/schwuk/django-getenv>`_, `dj-database-url <https://github.com/kennethreitz/dj-database-url>`_, `dj-email-url <https://github.com/migonzalvar/dj-email-url>`_, `dj-search-url <https://github.com/dstufft/dj-search-url>`_ and `django-cache-url <https://github.com/ghickman/django-cache-url>`_ combined together.


Installation
------------

.. code-block:: sh

pip install django-confy


Example for settings.py
-----------------------

.. code-block:: py

from confy import env, database, cache

DEBUG = env('DEV')
SECRET_KEY = env('SECRET_KEY')

DATABASES = {'default': database.config()}

CACHES = {'default': cache.config()}


Example for .env file
---------------------

.. code-block:: sh

DJANGO_SETTINGS_MODULE=project_name.settings
DEV=True
DATABASE_URL=sqlite:////server/apps/project_name/project_name.sqlite3
CACHE_URL=uwsgi://


Example manage.py
-----------------

.. code-block:: py

#!/usr/bin/env python
import sys
import confy
confy.read_environment_file()
if __name__ == "__main__":
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)


Example for wsgi.py
---------------

.. code-block:: py

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


Credits
-------

* Code borrowed by `Eugene MechanisM <https://git.io/MechanisM>`_
* Released under `MIT License <http://www.opensource.org/licenses/mit-license.php>`_

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

django-confy-1.0.4.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

django_confy-1.0.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file django-confy-1.0.4.tar.gz.

File metadata

File hashes

Hashes for django-confy-1.0.4.tar.gz
Algorithm Hash digest
SHA256 35b0242a54d484dac05c1a59d6d9d0a5bb4241651c365ad23b60e5a46ff7b3b1
MD5 0ac740b3abb3e302957f454e842b4159
BLAKE2b-256 2dda7006e4cf5ed60f1dbf074efdff207a4ca089036ec7e123cca398ed087441

See more details on using hashes here.

File details

Details for the file django_confy-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for django_confy-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cde50fd3d087d850a7aa59e053ba2f0d5b3866c5ec82a96e3035ac4ded4c3b38
MD5 67f0156b394079a07e886b7339ce9420
BLAKE2b-256 29aef11230078b455f26e9a0327ba9f9f67875cfdf5070cab84e77236b3bde2f

See more details on using hashes here.

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