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>`_
~~~~~~~~~~~~
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>`_
Release files for django-confy 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-confy-1.0.4.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_confy-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / django-confy-1.0.4.tar.gz
| Download URL | django-confy-1.0.4.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35b0242a54d484dac05c1a59d6d9d0a5bb4241651c365ad23b60e5a46ff7b3b1
|
|
BLAKE2b-256 checksum How to use checksums |
2dda7006e4cf5ed60f1dbf074efdff207a4ca089036ec7e123cca398ed087441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_confy-1.0.4-py3-none-any.whl
| Download URL | django_confy-1.0.4-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cde50fd3d087d850a7aa59e053ba2f0d5b3866c5ec82a96e3035ac4ded4c3b38
|
|
BLAKE2b-256 checksum How to use checksums |
29aef11230078b455f26e9a0327ba9f9f67875cfdf5070cab84e77236b3bde2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |