How to run a web2py project from within PyCharm?

1,352 views
Skip to first unread message

Hoon Chung

unread,
Dec 23, 2013, 4:05:22 PM12/23/13
to web...@googlegroups.com
Hi, I just started to experiment with web2py by creating a blank project in PyCharm. Can somebody tell me how to run it from within PyCharm? The only documentation on web2py in PyCharm was to how create it but it doesn't mention how to run the project. Thanks for your help in advance.

Tim Richardson

unread,
Dec 23, 2013, 5:46:20 PM12/23/13
to
Do you have the professional or community edition of pycharm?

If if the professional version, you actually run the web2py server (using its built in webserver, rocket), not a particular application.

I open pycharm in the web2py directory, not the directory of my app.
This means in the project tree you see all applications; just work with the one of interest. If you're using git you can still have separate repos per application.

You can run web2py in debug mode; I have a preconfigured web2py run/debug configuration which pycharm added for me.
It calls the script web2py.py in "single instance only" mode. When you run or debug, it starts web2py as if you ran the script yourself, but in debug mode it binds to the server allowing you to put breakpoints in controllers (pydev does this too).
You use your browser to call the URL of interest (the web2py server gui has a convenient pages menu which lets you quickly go to the home page of your applications).

Clicking the debug icon again prompts you to close and restart the web2py server.

Avi A

unread,
Dec 23, 2013, 5:49:02 PM12/23/13
to web...@googlegroups.com
run web2py.py. 
Reply all
Reply to author
Forward
0 new messages