Skip to content

Commit

Permalink
Merge pull request #6 from utapyngo/fix-deprecation-warning
Browse files Browse the repository at this point in the history
Fix deprecation warning
  • Loading branch information
Mogost authored Jan 15, 2021
2 parents db81002 + 1ff33ed commit fed494b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion datatableview/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def get(self, request, *args, **kwargs):
"""

if request.is_ajax() or request.GET.get('ajax') == 'true':
if (
request.META.get("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest"
or request.GET.get("ajax") == "true"
):
return self.get_ajax(request, *args, **kwargs)
return super(DatatableMixin, self).get(request, *args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='django-datatable-view-compat',
version='0.8.5',
version='0.8.6',
description='This package is used in conjunction with the jQuery plugin '
'(http://http://datatables.net/), and supports state-saving detection'
' with (http://datatables.net/plug-ins/api). The package consists of '
Expand Down

0 comments on commit fed494b

Please sign in to comment.