7

Using Pagination, Django Signals, and Custom Middleware

In Chapter 6, we learned how to integrate Redis into the Django project and utilize Redis as a caching layer. Caching is important to get performance gains, but at times, we would want to optimize the overall response sent to the client. This can be achieved by implementing pagination.

In this chapter, we will learn how to implement pagination in Django and Django Rest Framework (DRF). Along with that, we will focus on Django signals and how they help developers decouple logic between different apps. In Chapter 5, we saw how Django authentication and authorization support using Django middleware out of the box; now we will learn how to create custom middleware in Django.

We will cover ...

Get Django in Production 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.