Oh I also added DJANGO_ENVIRONMENT into that, which lets you specify environmental based settings overrides from the command line.
Enjoy :) On Mon, Mar 7, 2011 at 9:09 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi, > > Omg, I was *just* thinking about whether I should do a blog entry about > this sort of requirement lmao. > > To combat multiple node hosting, we use a combination of code (as our > webapps are split over multiple servers, all of which have different > functions and varying environments) > > Here is a django snippet with it all in. > > http://djangosnippets.org/snippets/2384/ > > If it doesn't make sense, then just let me know. > > Cal > > On Mon, Mar 7, 2011 at 8:58 PM, Michael Radziej <m...@spieleck.de> wrote: > >> On Mon, 7 Mar 2011 10:26:53 -0800 (PST), octopusgrabbus < >> old_road_f...@verizon.net> wrote: >> > So, my question is, is there an accepted way to populate BASE_URL and >> > MEDIA_URL with some local setting, like perhaps calling a python >> > function?, because it's Python code? >> >> I usually have a set of setting modules somewhere: >> >> base_settings.py - defines the settings that are common to all systems >> prod_settings.py - imports * from base_settings and contains production >> settings >> test_settings.oy - similar >> >> BASE_URL and MEDIA_URL would then be set in prod_settings and >> test_settings. >> >> And then I set DJANGO_SETTINGS_MODULE accordingly. >> >> >> Does this make sense to you? >> >> >> Kind regards >> >> Michael >> >> -- >> 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 >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.