New web app tutorials in the VS and VS Code Python docs, and docs feedback

Dan Taylor

This post was written by Kraig Brockschmidt

Recognizing the popularity of the Django and Flask web app frameworks, we recently added several tutorials in the Python documentation that guide you through working with these frameworks in Microsoft’s Python-capable IDEs: the lightweight Visual Studio Code available on all operating systems, and the full Visual Studio for Windows. If you haven’t seen the tutorials yet, this blog post gives you a brief introduction. We also wanted to take the opportunity to highlight how you can contribute to docs, and the ways you can give feedback—both of which we very much welcome!

Flask in Visual Studio Code

First is Using Flask in Visual Studio Code, an already popular walkthrough that starts with creating an environment for Flask and getting a very simple Hello World app up and running. From there it introduces Python debugging and debugger configurations for Flask, using page templates, serving static files, and using template inheritance. The end result is a multi-page app as shown below, which can serve as a starting point for projects of your own. The completed code for the tutorial is available on GitHub.

Django and Flask in Visual Studio

For Visual Studio, we’ve added two series of tutorials for Django and Flask.

Learn Django in Visual Studio is a series of six articles in which you learn how to do the following:

  • Step 1: Create a basic Django project in a Git repository using the “Blank Django Web Project” template
  • Step 2: Create a Django app with one page and render that page using a template
  • Step 3: Serve static files, add pages, and use template inheritance
  • Step 4: Use the Django Web Project template to create an app with multiple pages and responsive design
  • Step 5: Authenticate users
  • Step 6: Use the Polls Django Web Project template to create an app that uses models, database migrations, and customizations to the administrative interface

As you can see, in this tutorial you learn about Django in the context of Visual Studio project templates. The tutorial explains everything that’s happening in the templates, so you can easily adapt the template-generated apps to suit your own needs. The code for the tutorial can of course be found on GitHub.

Learn Flask in Visual Studio, similarly, walks you through the different Flask project templates (code on GitHub):

  • Step 1: Create a basic Flask project in a Git repository using the “Blank Flask Web Project” template
  • Step 2: Create a Flask app with one page and render that page using a template
  • Step 3: Serve static files, add pages, and use template inheritance
  • Step 4: Use the Flask Web Project template to create an app with multiple pages and responsive design
  • Step 5: Use the Polls Flask Web Project template to create a polling app that uses a variety of storage options (Azure storage, MongoDB, or memory).

Other Highlights

We’ve also recently added a reference for Python-related item templates in Visual Studio. And if you’re interested in writing C++ modules that you can use from your Python programs, check out Creating a C++ extension for Python.

Contribute to the documentation!

Did you know that all the documentation for Visual Studio and Visual Studio Code is open source?

We’re delighted to receive contributions from the community in both docsets, and actively monitor pull requests. Truly, no contribution is too small. As the content developer who manages these docsets, I very much appreciate anyone who takes the time to fix a typo, correct an error, or otherwise make the docs better! Your contribution doesn’t have to be perfect, either: we’ll take the time to do the necessary editing and formatting.

And did you know you can contribute by simply using the Edit command that appears on each article in the Visual Studio Code docs:

and in the Visual Studio docs?

Those links take you straight into the GitHub repository for that article, where you can make edits, see the history, and enjoy all the other GitHub goodness.

Give docs feedback: what would you like to see?

We also welcome any doc issues or requests you have for new content. In the Visual Studio Docs, the Feedback command that alongside Edit takes you to the bottom of the page where you can create GitHub issues without leaving the docs at all. The Feedback section also shows existing issues and provides a Product Feedback link through which you can file bugs and feature requests for the Python Tools themselves. You can also just create an issue at any time directly in the Visual Studio docs repo.

We’re very responsive to issues and requests. For example, VS docs issue 1086, shown above, identified a detail that was missing from the documentation for the Python Environments window, which we fixed within a day!

For Visual Studio Code, we don’t have integration with GitHub directly in the docs, so just file an issue directly in the repo. For product feedback, use the Request and Report links on the right side of each docs page:

To file a issues for the Python Extension for Visual Studio Code itself (not the docs), go to https://github.com/Microsoft/vscode-python/issues.

In closing, it’s worth mentioning that although you can leave feedback through the “Is this page helpful?” controls in the docs, they are anonymous mechanisms that unfortunately don’t provide us any way to respond. We vastly prefer that you use GitHub issues so we can ask for more details and let you know when the issue has been addressed.

 

Kraig Brockschmidt Content Developer for Python in Visual Studio and Visual Studio Code

0 comments

Discussion is closed.

Feedback usabilla icon