Browse Source

Merge pull request #2610 from pallets/cli-syntaxerror

add note about syntax errors in custom scripts
pull/2611/head
David Lord 7 years ago committed by GitHub
parent
commit
94aaa24579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      docs/cli.rst

16
docs/cli.rst

@ -355,15 +355,25 @@ script is available. Note that you don't need to set ``FLASK_APP``. ::
$ pip install -e . $ pip install -e .
$ wiki run $ wiki run
.. admonition:: Errors in Custom Scripts
When using a custom script, if you introduce an error in your
module-level code, the reloader will fail because it can no longer
load the entry point.
The ``flask`` command, being separate from your code, does not have
this issue and is recommended in most cases.
.. _console script: https://packaging.python.org/tutorials/distributing-packages/#console-scripts .. _console script: https://packaging.python.org/tutorials/distributing-packages/#console-scripts
PyCharm Integration PyCharm Integration
------------------- -------------------
The Flask CLI features aren't yet fully integrated into the PyCharm IDE, Prior to PyCharm 2018.1, the Flask CLI features weren't yet fully
so we have to do a few tweaks to get them working smoothly. These integrated into PyCharm. We have to do a few tweaks to get them working
instructions should be similar for any other IDE you might want to use. smoothly. These instructions should be similar for any other IDE you
might want to use.
In PyCharm, with your project open, click on *Run* from the menu bar and In PyCharm, with your project open, click on *Run* from the menu bar and
go to *Edit Configurations*. You'll be greeted by a screen similar to go to *Edit Configurations*. You'll be greeted by a screen similar to

Loading…
Cancel
Save