mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[py3] Fixed admin_views tests
Also changed several occurrences of 'request' to 'response'.
This commit is contained in:
@@ -66,7 +66,7 @@ def patch_cache_control(response, **kwargs):
|
||||
# max-age, use the minimum of the two ages. In practice this happens when
|
||||
# a decorator and a piece of middleware both operate on a given view.
|
||||
if 'max-age' in cc and 'max_age' in kwargs:
|
||||
kwargs['max_age'] = min(cc['max-age'], kwargs['max_age'])
|
||||
kwargs['max_age'] = min(int(cc['max-age']), kwargs['max_age'])
|
||||
|
||||
# Allow overriding private caching and vice versa
|
||||
if 'private' in cc and 'public' in kwargs:
|
||||
|
||||
Reference in New Issue
Block a user