Skip to Main Content
Hands-On Application Development with PyCharm
book

Hands-On Application Development with PyCharm

by Quan Nguyen
September 2019
Beginner to intermediate content levelBeginner to intermediate
494 pages
13h
English
Packt Publishing
Content preview from Hands-On Application Development with PyCharm

Creating Django's list views

We briefly considered the creation of a Django view in Chapter 8, Integrating Django in PyCharm. However, there are a number of different options when it comes to designing a view for your applications. In this subsection, we will implement an aggregated view for multiple blog posts (a list view) so that users of the application can see and iterate through all the available blog posts in our Django project.

As we have learned, a Django view is defined as a function that takes in a web request and returns some form of response. The logic within the function specifies the data included in the response, as well as how it might be structured. First, let's create that list view:

  1. Open the blog/views.py file and edit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MASTERING PYCHARM

MASTERING PYCHARM

Nafiul Islam

Publisher Resources

ISBN: 9781789348262Supplemental Content