Skip to content

Commit 34e6189

Browse files
authored
Merge pull request #24 from jmichalicek/version-2
Version 2
2 parents 6afd4dc + ab1b8b6 commit 34e6189

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

django_mail_viewer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.0'
1+
__version__ = '2.0.0'

django_mail_viewer/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ def post(self, request, *args, **kwargs):
239239
connection.delete_message(f'<{message_id}>')
240240

241241
# apparently htmx POST requests do not send as XmlHttpRequest?
242-
if request.is_ajax() or request.headers.get('hx-request'):
242+
is_ajax = request.headers.get('x-requested-with') == 'XMLHttpRequest'
243+
if is_ajax or request.headers.get('hx-request'):
243244
response = HttpResponse('', status=200)
244245
current_url = request.META.get('HTTP_HX_CURRENT_URL', '')
245246
if message_id in current_url:

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.0
2+
current_version = 2.0.0
33
commit = True
44
tag = True
55

@@ -9,4 +9,3 @@ tag = True
99

1010
[wheel]
1111
universal = 1
12-

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from setuptools import find_packages, setup
66

7-
version = '1.0.0'
7+
version = '2.0.0'
88

99
if sys.argv[-1] == 'publish':
1010
try:
@@ -47,6 +47,7 @@
4747
'Framework :: Django :: 3.0',
4848
'Framework :: Django :: 3.1',
4949
'Framework :: Django :: 3.2',
50+
'Framework :: Django :: 4.0',
5051
'Intended Audience :: Developers',
5152
'License :: OSI Approved :: MIT License',
5253
'Natural Language :: English',

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ envlist =
44
{py37,py38,py39}-django-3
55
{py37,py38,py39}-django-31
66
{py37,py38,py39,py310}-django-32
7+
{py38,py39,py310}-django-40
78
stats
89

910
[gh-actions]
@@ -26,6 +27,7 @@ deps =
2627
django-3: Django>=3,<3.1
2728
django-31: Django>=3.1,<3.2
2829
django-32: Django>=3.2,<3.3
30+
django-40: Django>=4.0,<4.1
2931
-r{toxinidir}/requirements_test.txt
3032

3133
basepython =

0 commit comments

Comments
 (0)