django-environments / README

django-environments
===================

Manage different settings for different locations (machines), or
Fabric's 'roles', like local (your machine), development (shared
development system), test, staging/acceptance and production.

Compatibility with virtualenv
==============================

Please note django-environments can be nicely used together with
virtualenv, especially virtualenvwrapper's bin/postactivate script.

Getting Started
===============

This is a fully working Django project. You can copy files from it
as needed to your own projects.

 1. Copy scripts/initenv_example to scripts/initenv.
 2. Edit initenv and set ``PROJECT_ROOT``, ``DJANGO_PROJECT`` (always a
    subdirectory of ``PROJECT_ROOT``) and ``PROJECT_SETTINGS``.
 3. Activate the environment using ``source scripts/initenv``.
 4. When using virtualenv with virtualenvwrapper, you can do 
    ``source <path-to-project>/scripts/initenv`` from bin/postactivate.

If everything works okay, the following shell aliases are created:

 * cdroot - go to project root.
 * cdjango - go to django project root (one lower than project root).
 * runserver - perform manage.py runserver with the correct settings.

Directories
===========

 * The mysite/settings directory replaces settings.py and contains
   the default settings in generic.py, which is imported in __init__.py.
 * The mysite/settings/env directory contains the different settings
   files for every environment
 * All .wsgi files in the mysite/apache folder are equal; their
   respective filenames are used to determine which settings to import.
 * As discussed above, the scripts directory contains the shell
   scripts intended to be sourced with the ``source`` command.

Remarks
=======

 * manage.py is just there to make this a complete django project.
 * urls.py is just there to demonstrate the ``SERVE_MEDIA`` setting.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.