update CLI docs IDE integration
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent ac9589c · Browse files · 1 file·+10 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+10 added−9 removed
- other:+10 added−9 removed
Provenance
- Commit
c6a619a- Tree
8233d1d- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
ac9589c
1 file changed+10 added−9 removed
modified:docs/cli.rst+10 added-9 removed
489 unmodified lines490 491 PyCharm Integration492 -------------------493 494-Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully495-integrated into PyCharm. We have to do a few tweaks to get them working496-smoothly. These instructions should be similar for any other IDE you497-might want to use.494+PyCharm Professional provides a special Flask run configuration. For495+the Community Edition, we need to configure it to call the ``flask run``496+CLI command with the correct environment variables. These instructions497+should be similar for any other IDE you might want to use.498 499 In PyCharm, with your project open, click on *Run* from the menu bar and500 go to *Edit Configurations*. You'll be greeted by a screen similar to501 this:502 503 .. image:: _static/pycharm-runconfig.png504 :align: center505 :class: screenshot506- :alt: screenshot of pycharm's run configuration settings506+ :alt: Screenshot of PyCharms's run configuration settings.507 508 There's quite a few options to change, but once we've done it for one509 command, we can easily copy the entire configuration and make a single510 tweak to give us access to other commands, including any custom ones you511 may implement yourself.512 513 Click the + (*Add New Configuration*) button and select *Python*. Give514-the configuration a good descriptive name such as "Run Flask Server".515-For the ``flask run`` command, check "Single instance only" since you516-can't run the server more than once at the same time.514+the configuration a name such as "flask run". For the ``flask run``515+command, check "Single instance only" since you can't run the server516+more than once at the same time.517 518 Select *Module name* from the dropdown (**A**) then input ``flask``.519 520 The *Parameters* field (**B**) is set to the CLI command to execute2 unmodified lines523 524 You can skip this next step if you're using :ref:`dotenv`. We need to525 add an environment variable (**C**) to identify our application. Click526 on the browse button and add an entry with ``FLASK_APP`` on the left and527-the Python import or file on the right (``hello`` for example).527+the Python import or file on the right (``hello`` for example). Add an528+entry with ``FLASK_ENV`` and set it to ``development``.529 530 Next we need to set the working directory (**D**) to be the folder where531 our application resides.532 11 unmodified lines