Update settings.py

has_key not supported on python3xx. but 
ON_OPENSHIFT = 'OPENSHIFT_REPO_DIR' in os.environ
the above code will work with python2XX and python3xx