I'm trying to follow https://developers.openshift.com/en/python-flask.html, to set up a flask app on openshift.
I've followed the directions and have got it working at the command line using git-bash on win7.
/myflaskapp (master)
$ python wsgi.py
127.0.0.1 - - [16/Jun/2015 13:46:10] "GET / HTTP/1.1" 200 12
127.0.0.1 - - [16/Jun/2015 13:46:10] "GET /favicon.ico HTTP/1.1" 404 233
127.0.0.1 - - [16/Jun/2015 13:46:10] "GET /favicon.ico HTTP/1.1" 404 233
However as you can see the 'Run' and 'debug' buttons are greyed out, in Pycharm Pro 4.5. How can I get them working?
Create a configuration. For the simple app you show, all you need to do is execute flaskapp.py
. Right click on flaskapp.py
and chose "Create 'flaskapp'". You can chose "Edit Configurations..." from the dropdown to the left of the run button to edit the configuration that's created.
With PyCharm Community Edition 2019 on Windows :
Now you can run your app with Shift+F10 (Release) or Shift+F9 (Debug)
Open a web broswer and go to http:127.0.0.1:5000 (if your port is 5000, default port is 5000)
Below Screenshot of configuration
Notes :
(1) Flask.exe should be in the Scripts directory of the Python path, something like "C:\Users\YOUR_USERNAME\Local\Programs\Python\Python36-32\Scripts\flask.exe"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With