Skip to content

Commit c6a619a

Browse files
committed
update CLI docs IDE integration
1 parent ac9589c commit c6a619a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/cli.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,10 @@ script is available. Note that you don't need to set ``FLASK_APP``. ::
491491
PyCharm Integration
492492
-------------------
493493

494-
Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully
495-
integrated into PyCharm. We have to do a few tweaks to get them working
496-
smoothly. These instructions should be similar for any other IDE you
497-
might want to use.
494+
PyCharm Professional provides a special Flask run configuration. For
495+
the Community Edition, we need to configure it to call the ``flask run``
496+
CLI command with the correct environment variables. These instructions
497+
should be similar for any other IDE you might want to use.
498498

499499
In PyCharm, with your project open, click on *Run* from the menu bar and
500500
go to *Edit Configurations*. You'll be greeted by a screen similar to
@@ -503,17 +503,17 @@ this:
503503
.. image:: _static/pycharm-runconfig.png
504504
:align: center
505505
:class: screenshot
506-
:alt: screenshot of pycharm's run configuration settings
506+
:alt: Screenshot of PyCharms's run configuration settings.
507507

508508
There's quite a few options to change, but once we've done it for one
509509
command, we can easily copy the entire configuration and make a single
510510
tweak to give us access to other commands, including any custom ones you
511511
may implement yourself.
512512

513513
Click the + (*Add New Configuration*) button and select *Python*. Give
514-
the configuration a good descriptive name such as "Run Flask Server".
515-
For the ``flask run`` command, check "Single instance only" since you
516-
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 server
516+
more than once at the same time.
517517

518518
Select *Module name* from the dropdown (**A**) then input ``flask``.
519519

@@ -524,7 +524,8 @@ the development server.
524524
You can skip this next step if you're using :ref:`dotenv`. We need to
525525
add an environment variable (**C**) to identify our application. Click
526526
on the browse button and add an entry with ``FLASK_APP`` on the left and
527-
the Python import or file on the right (``hello`` for example).
527+
the Python import or file on the right (``hello`` for example). Add an
528+
entry with ``FLASK_ENV`` and set it to ``development``.
528529

529530
Next we need to set the working directory (**D**) to be the folder where
530531
our application resides.

0 commit comments

Comments
 (0)