Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: PyCharm CE doesn't have in-built support for Flask framework.

Image Modified

Inside your project (or folder if you're using Terminal/Command Prompt) create a file called helloworld.py. In the simplest form, it's enough for our web application to contain the following code

...

We can now open an internet browser and navigate to http://localhost:5000/ . You should see something similar to the following screenshot

Image RemovedImage Added

Return Type

In the example above, for every HTTP request we receive we return a String. However, we can return also larger amount of data - formatted as JSON for example, or even views (HTML).

...

The {% symbols denote Python code. Running our flask application now and navigating to http://localhost:5000/ will give this result

Image Modified



http://flask.pocoo.org/docs/1.0/quickstart/

...