Red Hat Bugzilla – Bug 823490
Wrong instructions about os.environ: BookMarks quick start
Last modified: 2015-05-14 21:54:28 EDT
Description of problem: BookMarks quick start app's instruction contains a misleading entry about os.environ variables
import os.environ # import if you are using OPENSHIFT_* vars
'NAME' = 'bookmarks' # change it according to your database name, or use os.environ['OPENSHIFT_APP_NAME'].
'USER' = 'admin' # change it according to your Root Username, or use os.environ['OPENSHIFT_DB_USERNAME'].
'PASSWORD' = 'xxxxxxxxxx' # change it according to your Root Password, or use os.environ['OPENSHIFT_DB_PASSWORD'].
'HOST' = 'xx.xx.xx.xx' # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_HOST'].
'PORT': '3306', # change it according to your Connection URL, or use os.environ['OPENSHIFT_DB_PORT'].
However the import statement shouldn't work like that. It must be
1) from os import environ - then I can access environment variables as environ['variable_name']
2) import os - then I can access environment variables as os.environ['variable_name']
One additional mistake:
Master Git URL is also wrong.
It is: git://github.com/lulinqing/openshift-bookmarks.git
It must be: git://github.com/lulinqing/openshift-bookmarks.git
Sorry... My last comment was wrong.
It must be: git://github.com/openshift/BookMarks-openshift-quickstart.git
Fixed by commit 7c2e60e8beef314a42572738ee52dfe911e63a80