On Aug 23, 2006, at 11:16 AM, Rob Hudson wrote: > Are these two scenarios possible in Django?
Of course :) Remember -- settings files are just Python code. This means you can include any type of logic in them that you like. I often write settings files that work a bit differently on different machines by using Python's ``platform`` module (http://docs.python.org/lib/module- platform.html) to key off the machine's name. So, for example, you might put the following in your ``settings.py``:: import platform if platform.node() == "devbox": MEDIA_URL = "http://localhost/" elif platform.node() == "prodbox": MEDIA_URL = "http://media.example.com/" Jacob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---