Re: runserver detection

2007-04-07 Thread [EMAIL PROTECTED]
Hi gordy, Allowing the webserver to intercept static content urls is a good and viable option. But (as the Chinese saying goes "to pick bones from an egg"), why add to urlpatterns entries that will never be used (in production)? I will use Malcolm's suggestion of adding another "flag" in settings

Re: runserver detection

2007-04-07 Thread [EMAIL PROTECTED]
On Apr 7, 1:43 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Running under the development server usually means you have a different > settings file to when you are in production. I tend to add an extra > variable to that, something like DEVELOPMENT=True, and test for that > setting in my UR

Re: runserver detection

2007-04-07 Thread gordyt
Hi chacs66, If you do you setup right you don't have to worry about it. Here is an example. Suppose you have an app called myapp and in the myapp folder you have a urls.py that contains this: urlpatterns += patterns( '', (r'^static_media/(?P.*)$', 'django.views.static.serve', {'doc

Re: runserver detection

2007-04-06 Thread Malcolm Tredinnick
On Fri, 2007-04-06 at 22:35 -0700, [EMAIL PROTECTED] wrote: > Hi, > > Is there a way to know if django is running under the development > runserver? > > This is so that I can conditionally include the static serve urls. > Running under the development server usually means you have a different

runserver detection

2007-04-06 Thread [EMAIL PROTECTED]
Hi, Is there a way to know if django is running under the development runserver? This is so that I can conditionally include the static serve urls. Thanks in advance. -chacs66 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go