Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-04-14 21:39:21 +02:00
parent eb32394d0b
commit 2f1c85427a
8 changed files with 118 additions and 77 deletions

View File

@@ -1108,3 +1108,10 @@ def strfdelta(tdelta):
)
return res
def request_is_ajax(request):
is_ajax = request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest'
if settings.TESTING:
is_ajax = True
return is_ajax