Some additions
This commit is contained in:
parent
dc9aff3d2f
commit
ce3d758343
@ -81,9 +81,6 @@ def hoptcha_protected(
|
||||
- debug_ignore: do not bypass CAPTCHA if in debug mode.
|
||||
"""
|
||||
|
||||
if DEBUG and not debug_ignore:
|
||||
return view_func(request, *args, **kwargs)
|
||||
|
||||
if isinstance(key, str):
|
||||
key_func = BUILTIN_KEYS.get(key)
|
||||
|
||||
@ -101,6 +98,9 @@ def hoptcha_protected(
|
||||
def decorator(view_func):
|
||||
@wraps(view_func)
|
||||
def _wrapped_view(request, *args, **kwargs):
|
||||
if DEBUG and not debug_ignore:
|
||||
return view_func(request, *args, **kwargs)
|
||||
|
||||
if exempt_if and exempt_if(request):
|
||||
return view_func(request, *args, **kwargs)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user