Detailed description in Django documentation: Handling conditional viewing
The following tools are especially useful:
@last_modifiedand @etagview decorators. You provide them with a function to calculate the value from the query, and everything else is done automatically.django.middleware.http.ConditionalGetMiddleware - ETag 304, , HTML , . .