1
0
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:
Claude Paroz
2012-08-14 14:36:11 +02:00
parent d6b8b125fb
commit c2d59e5564
6 changed files with 163 additions and 192 deletions

View File

@@ -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: