Hello Djangonauts, First of all let me say I'm relatively new to Django and Python. The problem I came across is how to setup multiple (two, to be precise) enviroments for my Django app on one physical machine runnig mod_python. The development environment is set up locally of course.
The idea is I would like to set up a production (prod) and pre- production (preprod) and have preprod updated and unit tests run everytime I commit changes to the SVN repo from my local machine (this can be easily done with svn-hooks). No problems so far, however what worries me is how to solve the settings riddle - I would like to have them dynamically imported depending of which environment (in this case it's simply another directory on my webserver) it is run on. So I had the concept to tag each environment with some marker file like "__DEV", "__PREPROD", "__PROD" and import specific settings from inside the main settings.py, depending on which tag-file exists in my cwd. Didn't succed, but wait, there's more. As I said, each environment is configured to different directory, so I have symlinks to site-packages/myapp for PROD (which is myapp.com:80) and site- packages/myapp_preprod for PREPROD (myapp.com:8080). Then I realised, that even if I get the dynamic-import issue solved, the preprod app will work with hardcoded "myapp." module instead of "myapp_preprod." for views dispatching (urls.py). Are there any hacks or, preferably, some simple and obvious solutions ;-) to accomplish my goal? Much love for your feedback. Take care, Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---