2

Enhancing Your Blog with Advanced Features

In the preceding chapter, we learned the main components of Django by developing a simple blog application. We created a simple blog application using views, templates, and URLs. In this chapter, we will extend the functionalities of the blog application with features that can be found in many blogging platforms nowadays. In this chapter, you will learn the following topics:

  • Using canonical URLs for models
  • Creating SEO-friendly URLs for posts
  • Adding pagination to the post list view
  • Building class-based views
  • Sending emails with Django
  • Using Django forms to share posts via email
  • Adding comments to posts using forms from models

The source code for this chapter can be found at https://github.com/PacktPublishing/Django-4-by-example/tree/main/Chapter02 ...

Get Django 4 By Example - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.