Skip to content

Commit

Permalink
[flask] fix code-block:: console
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacht committed Jan 27, 2022
1 parent 030645d commit f599863
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/guide_flask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If you wish to use another name make sure to replace **basic_flask** in all of t
Create application directory and files
--------------------------------------

::
.. code-block:: console
[isabell@stardust ~]$ mkdir basic_flask
[isabell@stardust ~]$ mkdir basic_flask/templates
Expand Down Expand Up @@ -98,7 +98,7 @@ Setup Python environment and install required packages

You definitely want to create an isolated Python environment. That way the required packages you are going to install with ``pip`` are encapsulated from your system's Python installation. We are using the ``venv`` module to first create a local environment called ``ENV`` (or whatever name you prefer) that we activate with ``source``. Once active, use the venv's ``pip`` to install ``flask`` and its dependencies as well as a local version of ``uwsgi``.

::
.. code-block:: console
[isabell@stardust ~]$ cd basic_flask
[isabell@stardust basic_flask]$ python3 -m venv ENV
Expand All @@ -109,7 +109,7 @@ You definitely want to create an isolated Python environment. That way the requi
Once you're done playing with it, you can deactivate the virtual environment:

::
.. code-block:: console
(ENV) [isabell@stardust basic_flask]$ deactivate
[isabell@stardust basic_flask]$
Expand All @@ -131,7 +131,7 @@ The proper fix is using a uWSGI deployment as we will do in the next step.

To start Werkzeug execute the following commands. This enables the virtual Python environment and loads ``app.py``. Stop it by pressing ``Ctrl + C``.

::
.. code-block:: console
[isabell@stardust ~]$ cd basic_flask
[isabell@stardust basic_flask]$ source ENV/bin/activate
Expand Down Expand Up @@ -179,7 +179,7 @@ replace the ``module = ...`` line with:
To serve your application via uWSGI execute the following commands. Stop it by pressing ``Ctrl + C``.

::
.. code-block:: console
[isabell@stardust ~]$ cd basic_flask
[isabell@stardust basic_flask]$ source ENV/bin/activate
Expand Down

0 comments on commit f599863

Please sign in to comment.