mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
Merge remote-tracking branch 'nagyv/patch-1'
Signed-off-by: Jannis Leidel <jannis@leidel.info>
This commit is contained in:
commit
f2a46fb009
2 changed files with 41 additions and 0 deletions
|
|
@ -13,3 +13,14 @@ def load_ipython_extension(ipython):
|
|||
from . import importer
|
||||
|
||||
importer.install()
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""
|
||||
The callback for Sphinx that acts as a Sphinx extension.
|
||||
|
||||
Add this to the ``extensions`` config variable in your ``conf.py``.
|
||||
"""
|
||||
from . import importer
|
||||
|
||||
importer.install()
|
||||
|
|
|
|||
|
|
@ -212,3 +212,33 @@ As you can see django-configurations provides a helper module
|
|||
``configurations.fastcgi`` that handles the setup of your configurations.
|
||||
|
||||
.. _runfcgi: https://docs.djangoproject.com/en/1.5/howto/deployment/fastcgi/
|
||||
|
||||
|
||||
Sphinx
|
||||
------
|
||||
|
||||
.. versionadded: 0.9
|
||||
|
||||
In case you would like to user the amazing `autodoc` feature of the
|
||||
documentation tool `Sphinx <http://sphinx-doc.org/>`_, you need add
|
||||
django-configurations to your ``extensions`` config variable and set
|
||||
the environment variable accordingly:
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 2-3, 12
|
||||
|
||||
# My custom Django environment variables
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
|
||||
os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode',
|
||||
# ...
|
||||
'configurations',
|
||||
]
|
||||
|
||||
# ...
|
||||
Loading…
Reference in a new issue