Re: Uses cases for dynamically changing MEDIA_URL

2006-08-23 Thread Rob Hudson
Great, that looks simple. What about the case for passing in a GET variable being passed in to switch between media coming from localhost vs. the default MEDIA_URL, as in case #2? Most likely I'd grab the GET variable and store it in the session. Can the settings reference session data, or

Re: Uses cases for dynamically changing MEDIA_URL

2006-08-23 Thread Jacob Kaplan-Moss
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

Uses cases for dynamically changing MEDIA_URL

2006-08-23 Thread Rob Hudson
We've got a couple of cases in our current PHP libraries that we're trying to find equivalents for in Django. Here are a few scenarios we have currently to pull media (mostly videos) from different places depending on the user or user preferences... 1. During development and testing we host