Hi Mike, Yes this idea is simple enough.
I just wondered whether there isn't a tiny risk of finding 'test' as a paramter of one of the option in some esotheric cases. For what I am doing the solution should be absolutely fine. With my habit of using ./manage.py I could even change it to if sys.argv[1] == 'test' On 11/24/2011 12:23 AM, Mike Dewhirst wrote: > There was a great solution to this posted just yesterday ... > > import sys > if 'runserver' in sys.argv: > DEBUG = True > else: > DEBUG = False > > > ... which suggests > > if 'test' in sys.argv: > do this > > -- 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.