0001-middleware-skip-media-script-HTTP-requets-30497.patch
mellon/middleware.py | ||
---|---|---|
37 | 37 |
# Skip AJAX requests |
38 | 38 |
if request.is_ajax(): |
39 | 39 |
return |
40 |
# Skip AJAX and media/script requests, unless mellon_no_passive is False on the view |
|
41 |
if getattr(view_func, 'mellon_no_passive', True) and 'text/html' not in request.META.get('HTTP_ACCEPT', ''): |
|
42 |
return |
|
40 | 43 |
# Skip views asking to be skiped |
41 | 44 |
if getattr(view_func, 'mellon_no_passive', False): |
42 | 45 |
return |
43 |
- |