mirror of
https://github.com/django/django.git
synced 2025-11-03 05:13:23 +00:00
Fixed #15840 -- Wrapped inner function of the condition decorator with functools.wraps to follow best practices. Thanks, zsiciarz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
49288f8388
commit
4b71c9998e
2 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ from django.utils.functional import allow_lazy, lazy, memoize
|
|||
from django.utils.unittest import TestCase
|
||||
from django.views.decorators.cache import cache_page, never_cache, cache_control
|
||||
from django.views.decorators.clickjacking import xframe_options_deny, xframe_options_sameorigin, xframe_options_exempt
|
||||
from django.views.decorators.http import require_http_methods, require_GET, require_POST, require_safe
|
||||
from django.views.decorators.http import require_http_methods, require_GET, require_POST, require_safe, condition
|
||||
from django.views.decorators.vary import vary_on_headers, vary_on_cookie
|
||||
|
||||
|
||||
|
|
@ -38,6 +38,7 @@ full_decorator = compose(
|
|||
require_GET,
|
||||
require_POST,
|
||||
require_safe,
|
||||
condition(lambda r: None, lambda r: None),
|
||||
|
||||
# django.views.decorators.vary
|
||||
vary_on_headers('Accept-language'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue