From c3c6b06a502eaa6cda83bdeef9c1530f8c3536cc Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:31:09 +0000
Subject: [PATCH 1/7] updates settings to support Django 4
---
testapp/settings.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testapp/settings.py b/testapp/settings.py
index 00d3fa3..492cba8 100644
--- a/testapp/settings.py
+++ b/testapp/settings.py
@@ -70,6 +70,7 @@ TEMPLATES = [
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
+ 'django.template.context_processors.request',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
@@ -81,3 +82,5 @@ TEMPLATES = [
MARKDOWNX_MARKDOWN_EXTENSIONS = [
'markdown.extensions.extra',
]
+
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
From 675b1700349fcd5107de6be452c1b98364310a10 Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:31:55 +0000
Subject: [PATCH 2/7] integrates new Django URL system w/ backward
compatibility
---
testapp/urls.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/testapp/urls.py b/testapp/urls.py
index 78ed427..ba74627 100644
--- a/testapp/urls.py
+++ b/testapp/urls.py
@@ -1,5 +1,10 @@
from django.conf import settings
-from django.conf.urls import include, url
+
+try:
+ from django.conf.urls import include, url
+except ImportError:
+ from django.urls import include, re_path as url
+
from django.conf.urls.static import static
from django.contrib import admin
@@ -10,4 +15,5 @@ urlpatterns = [
url(r'^$', TestFormView.as_view(), name='form_view'),
url(r'^markdownx/', include('markdownx.urls')),
url(r'^admin/', admin.site.urls),
-] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+ *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+]
From ec727107e67058e839aef2244d2b8a1068e383b5 Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:37:29 +0000
Subject: [PATCH 3/7] integrates Python 3.10 and Django 3.2 / 4
---
.travis.yml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index b57c2d8..ce9104e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,22 @@ matrix:
env: DJANGO=3.0.*
- python: 3.8
env: DJANGO=3.1.*
+ - python: 3.8
+ env: DJANGO=3.2.*
+
+ - python: 3.9
+ env: DJANGO=3.1.*
+ - python: 3.9
+ env: DJANGO=3.2.*
+ - python: 3.9
+ env: DJANGO=4.0.*
+
+ - python: 3.10
+ env: DJANGO=3.1.*
+ - python: 3.10
+ env: DJANGO=3.2.*
+ - python: 3.10
+ env: DJANGO=4.0.*
- os: osx
language: generic
From d8310bf465119e52411fb196c62d88c2332a5e2b Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:39:21 +0000
Subject: [PATCH 4/7] adds Django 4 / Python 3.9 & 3.10 to classifiers
---
setup.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/setup.py b/setup.py
index 5b832a6..96062f0 100755
--- a/setup.py
+++ b/setup.py
@@ -102,6 +102,8 @@ setup(
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
+ 'Framework :: Django :: 3.2',
+ 'Framework :: Django :: 4.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
@@ -109,6 +111,8 @@ setup(
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
'Programming Language :: JavaScript',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Multimedia :: Graphics',
From 3e41d0eb0202f208d6afe43b63099823b109ecba Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:39:34 +0000
Subject: [PATCH 5/7] major version bump
---
markdownx/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/markdownx/__init__.py b/markdownx/__init__.py
index 82dc418..aaed23b 100755
--- a/markdownx/__init__.py
+++ b/markdownx/__init__.py
@@ -66,7 +66,7 @@ __copyright__ = 'Copyright 2017'
__license__ = 'BSD'
__maintainer__ = 'Adi, Pouria Hadjibagheri'
__url__ = 'https://github.com/neutronX/django-markdownx'
-__version__ = '3.0.1'
+__version__ = '4.0.0'
__description__ = 'A comprehensive Markdown editor built for Django.'
# ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
From 9cbaeb803733768c6d55b035cefe2cbdba4187e8 Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:41:16 +0000
Subject: [PATCH 6/7] updates supported Django versions
---
README.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.rst b/README.rst
index cbc931e..e86ceef 100755
--- a/README.rst
+++ b/README.rst
@@ -44,5 +44,5 @@ Preview
.. |Build_Status| image:: https://img.shields.io/travis/neutronX/django-markdownx.svg
.. |Format| image:: https://img.shields.io/pypi/format/django-markdownx.svg
.. |Supported_versions_of_Python| image:: https://img.shields.io/pypi/pyversions/django-markdownx.svg
-.. |Supported_versions_of_Django| image:: https://img.shields.io/badge/Django-2.0,%202.1,%202.2,%203.0-green.svg
+.. |Supported_versions_of_Django| image:: https://img.shields.io/badge/Django-2.0,%202.1,%202.2,%203.0,%203.1,%203.2,%204.0-green.svg
.. |License| image:: https://img.shields.io/pypi/l/django-markdownx.svg
From 36a65a9bd3c3b1e596fa17a0e4b371d75e70f919 Mon Sep 17 00:00:00 2001
From: Pouria Hadjibagheri
Date: Mon, 27 Dec 2021 11:44:30 +0000
Subject: [PATCH 7/7] updates supported Django versions
---
docs-src/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs-src/index.md b/docs-src/index.md
index 854fd94..d72fd46 100644
--- a/docs-src/index.md
+++ b/docs-src/index.md
@@ -4,7 +4,7 @@



-
+

Django MarkdownX is a comprehensive [Markdown](https://en.wikipedia.org/wiki/Markdown) plugin built for [Django](https://www.djangoproject.com), the renowned high-level Python web framework, with flexibility, extensibility, and ease-of-use at its core.