I use the following:
my pythonpath includes /usr/local/lib/django/
within which I have:
    apps/
        app1/(models,views,urls)
        app2/(models,views,urls), etc.
    vhosts/
        vhost1/(settings,urls)
        vhost2/(settings,urls), etc.

within the config for each apache virtual host I have a different
DJANGO_SETTINGS_MODULE like vhosts.vhost1.settings

this way apps and vhosts are completely separate in the hierarchy, but
it is all within the same python path entry. It works well with
subversion because I have one code structure to capture all my apps
and vhosts and I can test out different vhost settings on different
servers by changing DJANGO_SETTINGS_MODULE in the apache config. I
have all my settings.py files import local_secrets.local_secrets, a
function that returns the proper database password and secret key
depending on whether a "DEVELOPMENT_MODE" parameter is set and on the
calling vhost. local_secrets.py is elsewhere on my pythonpath on each
physical server. That keeps that stuff out of my subversion tree.

templates and media are stored elsewhere where the designers have
access, using the same hierarchy as apps, but with an additional
vhosts directory containing overrides specific to particular vhosts.
In subversion I have code, templates and media directories below
trunk. Initially I had templates and media as subdirectories in each
app (to maximize app portability), but I found the access issues for
designers too cumbersome (chmod won't follow symlinks so granting
permissions to template and media subdirectories within each app is
unwieldy, and it was much easier to have media actually in the media
server docroot since we could use existing share permissions and have
user-restore capability (the docroots are mounted from a snapvaulted
SAN), and the designers don't play nice with subversion so I could
give them their own branch, etc.)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to