Deploying Flask in Openshift
<p>The following codes are working without any problem in my system's localhost... But ain't doing the job on OpenShift..
There is something wrong with my <strong>wsgi.py</strong>..  Do I have to pass my username and password using environment variables OR I've need to change the <em>localhost</em> ? </p>

<p>The following is the tree of the directory/repository...</p>

<pre><code>myflaskaws
├── requirements.txt
├── setup.py
├── static
│   ├── assets
│   │   ├── style.css
│   └── images
│       ├── no.png
│       └── yes.png
├── templates
│   ├── index.html
│   ├── login.html
│   ├── searchlist.html
│   ├── update.html
├── test.py
├── test.pyc
└── wsgi.py`
</code></pre>

<hr>

<p><strong>wsgi.py</strong></p>

<pre><code>#!/usr/bin/python
import os
virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
    execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
    pass
from test import app as application
if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    httpd = make_server('localhost', 8051, application)
    print("Serving at http://localhost:8051/ \n PRESS CTRL+C to Terminate. \n")
    httpd.serve_forever()
    print("Terminated!!")
</code></pre>

<hr>

<p><strong>test.py</strong></p>

<pre><code>from flask import Flask
app = Flask(__name__)
</code></pre>

<p>PS : I'm not using "<em>if <strong>name</strong> == '<strong>main</strong>':</em>" in <strong>test.py</strong></p>