From 163aed8520be52428f725ab6d98f10a117754279 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 30 Apr 2013 17:07:11 +0200 Subject: [PATCH] Normalized name of example settings class to `Prod`. --- README.rst | 10 +++++----- docs/index.rst | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 7fd8e6b..55fcced 100644 --- a/README.rst +++ b/README.rst @@ -29,7 +29,7 @@ settings constants, e.g.: from configurations import Settings - class MySiteSettings(Settings): + class Prod(Settings): DEBUG = True Set the ``DJANGO_CONFIGURATION`` environment variable to the name of the class @@ -37,7 +37,7 @@ you just created, e.g. in bash: .. code-block:: console - export DJANGO_CONFIGURATION=MySiteSettings + export DJANGO_CONFIGURATION=Prod and the ``DJANGO_SETTINGS_MODULE`` environment variable to the module import path as usual, e.g. in bash: @@ -50,7 +50,7 @@ import path as usual, e.g. in bash: management commands along the lines of Django's default ``--settings`` command line option, e.g.:: - python manage.py runserver --settings=mysite.settings --configuration=MySiteSettings + python manage.py runserver --settings=mysite.settings --configuration=Prod To enable Django to use your configuration you now have to modify your **manage.py** or **wsgi.py** script to use django-configurations's versions @@ -66,7 +66,7 @@ django-configurations would look like this: if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') - os.environ.setdefault('DJANGO_CONFIGURATION', 'MySiteSettings') + os.environ.setdefault('DJANGO_CONFIGURATION', 'Prod') from configurations.management import execute_from_command_line @@ -83,7 +83,7 @@ The same applies to your **wsgi.py** file, e.g.: import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') - os.environ.setdefault('DJANGO_CONFIGURATION', 'MySiteSettings') + os.environ.setdefault('DJANGO_CONFIGURATION', 'Prod') from configurations.wsgi import get_wsgi_application diff --git a/docs/index.rst b/docs/index.rst index da45f1e..fa18a16 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -102,7 +102,7 @@ setting other values, e.g.:: from configurations import Settings - class Base(Settings): + class Prod(Settings): TEMPLATE_CONTEXT_PROCESSORS = \ Settings.TEMPLATE_CONTEXT_PROCESSORS + ( 'django.core.context_processors.request', @@ -127,7 +127,7 @@ a Settings class:: from configurations import Settings - class AcmeProd(Settings, FullPageCaching): + class Prod(Settings, FullPageCaching): DEBUG = False # ...