A little different in order. 

Do all the openshift stuff first, then download web2py and copy it into the 
wsgi folder. 

I would suggest using the application file I provide on the github repo and 
modify:

This:
sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'libs', 
'gluon'))
to This:
sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 
'web2by', 'gluon')) #honestly I don't know if sys.path.append handles stuff 
recursively so maybe this isn't necessary and you just comment out the 
gluon line. 

There are other nuances like addressing db host / port / user / pass 
variables that should all be setup in wsgi/application file. For example if 
you're using SQL lite, I have an example variable setup in the 
wsgi/application handler and then in your model you'd just use something 
like: 

db = DAL('sqlite://storage.sqlite',folder=SQLITE_DIR)

If you want to use the admin, you'll need to create a parameters_443.py 
with your hashed password in it but there are caveats to using the IDE in 
the cloud since app changes are applied via rhc / git. This is why I 
created the openshift deployer.

Andrew

-- 



Reply via email to