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
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 URL configuration.

If you wanted to be truly tricky, you could look at the Python stack and
work out if we are calling a method in django.core.management. However,
I wouldn't recommend that.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to