Navigation Menu

Skip to content

Commit

Permalink
added to tools: is_testenv()
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hager committed Mar 6, 2011
1 parent 7df4e06 commit 2fc0c91
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/tools.py
@@ -0,0 +1,11 @@
from os import environ


def is_textenv():
"""
True if devserver, False if appengine server
Appengine uses 'Google App Engine/1.4.2',
Devserver uses 'Development/1.0'
"""
return environ.get('SERVER_SOFTWARE', '').startswith('Development')

0 comments on commit 2fc0c91

Please sign in to comment.