import os


config = {
    'DEBUG': not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine/'),
    'SECRET_KEY': 'Some big sentence',
}
import os


config = {
    'DEBUG': True if os.getenv('SERVER_SOFTWARE', '').startswith('Development/') else False,
    'SECRET_KEY': 'Some big sentence',
}

Set DEBUG to true only when using Development server