From ad602a2b6eb81bb90bd339bd0dedf6d8f99df1d8 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 20 Nov 2019 08:17:13 +1100 Subject: [PATCH 001/101] Fix simple typo: verficiation -> verification --- mezzanine/core/auth_backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mezzanine/core/auth_backends.py b/mezzanine/core/auth_backends.py index c06444d4bb..4845caf45e 100644 --- a/mezzanine/core/auth_backends.py +++ b/mezzanine/core/auth_backends.py @@ -21,7 +21,7 @@ class MezzanineBackend(ModelBackend): For login, is_active is not given, so that the login form can raise a specific error for inactive users. For password reset, True is given for is_active. - For signup verficiation, False is given for is_active. + For signup verification, False is given for is_active. """ def authenticate(self, *args, **kwargs): From 9524209aec6d7f1d0279809ee2d495235a216b4a Mon Sep 17 00:00:00 2001 From: Eugene Duboviy Date: Thu, 17 Oct 2019 14:42:17 +0300 Subject: [PATCH 002/101] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 927c288431..b02f1b3828 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ env: python: - "3.5" - "3.6" + - "3.7" + - "3.8" install: - pip install --upgrade pip setuptools tox script: From efbb149ec8e739e5232b41aeae7ac3683f16d450 Mon Sep 17 00:00:00 2001 From: Eugene Duboviy Date: Thu, 17 Oct 2019 14:43:40 +0300 Subject: [PATCH 003/101] Update overview.rst --- docs/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview.rst b/docs/overview.rst index 1ace7c15a4..cc274cc58f 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -45,7 +45,7 @@ standard Django environment), with the following dependencies, which unless noted as optional, should be installed automatically following the above instructions: -* `Python`_ 2.7 to 3.6 +* `Python`_ 2.7 to 3.8 * `Django`_ 1.8 to 1.11 * `django-contrib-comments`_ - for built-in threaded comments * `Pillow`_ - for image resizing (`Python Imaging Library`_ fork) From 7624b8f7a22901828d4242831ba6122d1cc03092 Mon Sep 17 00:00:00 2001 From: Eugene Duboviy Date: Thu, 17 Oct 2019 14:44:23 +0300 Subject: [PATCH 004/101] Update setup.py --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index c4df699e2d..4f08d8a7f5 100755 --- a/setup.py +++ b/setup.py @@ -82,6 +82,8 @@ "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", From 9768b46f8377796d5d51d74db54589c9d3669a47 Mon Sep 17 00:00:00 2001 From: Pete Dermott Date: Wed, 12 Aug 2020 01:27:32 +0100 Subject: [PATCH 005/101] feat: Add Django 2.2 compatability (#1956) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: Support for Python 2 and Django < 2.2 has been dropped From: https://github.com/bors-ltd/mezzanine/commit/88aa6c9ea93321fd6754026ec858faaee971f580 Related to: https://github.com/stephenmcd/mezzanine/issues/1895 Co-authored-by: Frankie Robertson Co-authored-by: Marcos Sánchez Provencio Co-authored-by: zriv Co-authored-by: Tuk Bredsdorff Co-authored-by: Peter Dermott Co-authored-by: Diego Rabatone Oliveira --- .travis.yml | 12 +- mezzanine/__init__.py | 1 - mezzanine/accounts/__init__.py | 2 - mezzanine/accounts/admin.py | 2 - mezzanine/accounts/defaults.py | 2 - mezzanine/accounts/forms.py | 2 - .../accounts/templatetags/accounts_tags.py | 2 - mezzanine/accounts/tests.py | 2 - mezzanine/accounts/views.py | 2 - mezzanine/bin/runtests.py | 2 - mezzanine/blog/__init__.py | 2 - mezzanine/blog/admin.py | 2 - mezzanine/blog/defaults.py | 2 - mezzanine/blog/feeds.py | 2 - mezzanine/blog/forms.py | 2 - mezzanine/blog/management/base.py | 7 +- .../management/commands/import_blogger.py | 2 - .../management/commands/import_posterous.py | 2 - .../blog/management/commands/import_rss.py | 11 +- .../blog/management/commands/import_tumblr.py | 9 +- .../management/commands/import_wordpress.py | 3 - mezzanine/blog/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20150527_1555.py | 2 - .../migrations/0003_auto_20170411_0504.py | 3 - mezzanine/blog/models.py | 3 - .../blog/templates/blog/blog_post_detail.html | 2 +- .../blog/templates/blog/blog_post_list.html | 2 +- mezzanine/blog/templatetags/blog_tags.py | 1 - mezzanine/blog/tests.py | 7 +- mezzanine/blog/urls.py | 32 +- mezzanine/blog/views.py | 3 - mezzanine/boot/__init__.py | 2 - mezzanine/conf/admin.py | 3 - mezzanine/conf/forms.py | 3 - mezzanine/conf/models.py | 4 - mezzanine/conf/tests.py | 3 - mezzanine/core/__init__.py | 2 - mezzanine/core/admin.py | 5 +- mezzanine/core/apps.py | 2 - mezzanine/core/auth_backends.py | 2 - mezzanine/core/checks.py | 2 - mezzanine/core/defaults.py | 6 +- mezzanine/core/exceptions.py | 3 - mezzanine/core/fields.py | 3 - mezzanine/core/forms.py | 38 +- mezzanine/core/management/__init__.py | 1 - .../management/commands/collecttemplates.py | 4 - .../core/management/commands/createdb.py | 3 - .../core/management/commands/runserver.py | 1 - mezzanine/core/managers.py | 14 +- mezzanine/core/middleware.py | 8 +- mezzanine/core/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20150414_2140.py | 2 - mezzanine/core/models.py | 15 +- mezzanine/core/request.py | 2 - mezzanine/core/sitemaps.py | 2 - mezzanine/core/static/css/mezzanine.css | 11 + .../static/mezzanine/css/admin/global.css | 4 +- .../core/static/mezzanine/css/admin/rtl.css | 2 +- .../static/mezzanine/js/admin/ajax_csrf.js | 10 +- .../mezzanine/js/admin/keywords_field.js | 26 +- .../core/static/mezzanine/js/jquery-1.12.4.js | 11008 +++++++++ .../core/static/mezzanine/js/jquery-3.4.1.js | 10598 +++++++++ .../static/mezzanine/js/jquery-ui-1.12.1.js | 18706 ++++++++++++++++ mezzanine/core/templates/admin/base_site.html | 16 +- mezzanine/core/templatetags/mezzanine_tags.py | 15 +- mezzanine/core/tests.py | 13 +- mezzanine/core/urls.py | 18 +- mezzanine/core/views.py | 8 +- mezzanine/forms/__init__.py | 2 - mezzanine/forms/admin.py | 3 - mezzanine/forms/defaults.py | 2 - mezzanine/forms/fields.py | 8 +- mezzanine/forms/forms.py | 9 +- mezzanine/forms/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20141227_0224.py | 2 - mezzanine/forms/migrations/0003_emailfield.py | 2 - .../migrations/0004_auto_20150517_0510.py | 2 - .../migrations/0005_auto_20151026_1600.py | 2 - .../migrations/0006_auto_20170425_2225.py | 3 - mezzanine/forms/page_processors.py | 2 - mezzanine/forms/signals.py | 2 - mezzanine/forms/tests.py | 2 - mezzanine/galleries/__init__.py | 2 - mezzanine/galleries/admin.py | 2 - .../galleries/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20141227_0224.py | 2 - mezzanine/galleries/models.py | 6 +- mezzanine/galleries/tests.py | 6 +- mezzanine/generic/__init__.py | 2 - mezzanine/generic/admin.py | 2 - mezzanine/generic/defaults.py | 4 - mezzanine/generic/fields.py | 6 +- mezzanine/generic/forms.py | 8 +- mezzanine/generic/managers.py | 2 - mezzanine/generic/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20141227_0224.py | 2 - .../migrations/0003_auto_20170411_0504.py | 3 - mezzanine/generic/models.py | 3 - .../generic/templatetags/comment_tags.py | 3 - mezzanine/generic/templatetags/disqus_tags.py | 3 - .../generic/templatetags/keyword_tags.py | 3 - mezzanine/generic/templatetags/rating_tags.py | 2 - mezzanine/generic/tests.py | 2 - mezzanine/generic/urls.py | 8 +- mezzanine/generic/views.py | 3 - mezzanine/pages/__init__.py | 2 - mezzanine/pages/admin.py | 30 +- mezzanine/pages/checks.py | 2 - mezzanine/pages/context_processors.py | 1 - mezzanine/pages/defaults.py | 2 - mezzanine/pages/fields.py | 2 - mezzanine/pages/managers.py | 3 - mezzanine/pages/middleware.py | 2 - mezzanine/pages/migrations/0001_initial.py | 2 - .../migrations/0002_auto_20141227_0224.py | 2 - .../migrations/0003_auto_20150527_1555.py | 2 - .../migrations/0004_auto_20170411_0504.py | 3 - mezzanine/pages/models.py | 7 +- mezzanine/pages/page_processors.py | 5 +- .../js/admin/jquery.mjs.nestedSortable.js | 799 +- .../admin/pages/page/change_list.html | 4 - mezzanine/pages/tests.py | 3 - mezzanine/pages/urls.py | 6 +- mezzanine/pages/views.py | 3 - .../project_template/project_name/settings.py | 61 +- .../project_template/project_name/urls.py | 14 +- mezzanine/project_template/requirements.txt | 2 +- mezzanine/template/loader_tags.py | 3 - mezzanine/template/loaders/host_themes.py | 2 - mezzanine/twitter/admin.py | 4 +- mezzanine/twitter/models.py | 11 +- mezzanine/urls.py | 29 +- mezzanine/utils/__init__.py | 1 - mezzanine/utils/admin.py | 2 - mezzanine/utils/cache.py | 2 - mezzanine/utils/conf.py | 2 - mezzanine/utils/docs.py | 3 - mezzanine/utils/email.py | 3 - mezzanine/utils/html.py | 3 - mezzanine/utils/importing.py | 2 - mezzanine/utils/models.py | 6 +- mezzanine/utils/sites.py | 2 - mezzanine/utils/static.py | 2 - mezzanine/utils/tests.py | 3 - mezzanine/utils/timezone.py | 2 - mezzanine/utils/urls.py | 5 +- mezzanine/utils/views.py | 12 +- setup.py | 2 +- tox.ini | 10 +- 150 files changed, 41135 insertions(+), 751 deletions(-) create mode 100644 mezzanine/core/static/mezzanine/js/jquery-1.12.4.js create mode 100644 mezzanine/core/static/mezzanine/js/jquery-3.4.1.js create mode 100644 mezzanine/core/static/mezzanine/js/jquery-ui-1.12.1.js diff --git a/.travis.yml b/.travis.yml index b02f1b3828..d30204e36b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python env: - - DJANGO="111" - - DJANGO="20" - - DJANGO="21" + - DJANGO="22" - DJANGO="master" python: - "3.5" @@ -16,12 +14,8 @@ script: matrix: fast_finish: true include: - - python: "2.7" - env: DJANGO="111" - - python: "3.4" - env: DJANGO="111" - - python: "3.4" - env: DJANGO="20" + - python: "3.5" + env: DJANGO="22" allow_failures: - env: DJANGO="master" notifications: diff --git a/mezzanine/__init__.py b/mezzanine/__init__.py index 865d0f9985..ed48cdab09 100644 --- a/mezzanine/__init__.py +++ b/mezzanine/__init__.py @@ -1,2 +1 @@ - __version__ = "4.3.1" diff --git a/mezzanine/accounts/__init__.py b/mezzanine/accounts/__init__.py index f9a950018d..e480ccd8f8 100644 --- a/mezzanine/accounts/__init__.py +++ b/mezzanine/accounts/__init__.py @@ -5,8 +5,6 @@ setting. Some utility functions for probing the profile model are included below. """ -from __future__ import unicode_literals - from django.apps import apps from django.conf import settings from django.contrib.auth import get_user_model diff --git a/mezzanine/accounts/admin.py b/mezzanine/accounts/admin.py index 5fdf3b6a87..6b6b7ce39c 100644 --- a/mezzanine/accounts/admin.py +++ b/mezzanine/accounts/admin.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.contrib import admin from django.contrib.auth import get_user_model from mezzanine.accounts import get_profile_model, ProfileNotConfigured diff --git a/mezzanine/accounts/defaults.py b/mezzanine/accounts/defaults.py index 18f46af48b..c255fc489b 100644 --- a/mezzanine/accounts/defaults.py +++ b/mezzanine/accounts/defaults.py @@ -9,8 +9,6 @@ that are only read during startup shouldn't be editable, since changing them would require an application reload. """ -from __future__ import unicode_literals - from django.utils.translation import ugettext_lazy as _ from mezzanine.conf import register_setting diff --git a/mezzanine/accounts/forms.py b/mezzanine/accounts/forms.py index 1014fd54d9..8f982eb0e9 100644 --- a/mezzanine/accounts/forms.py +++ b/mezzanine/accounts/forms.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.contrib.auth import authenticate, get_user_model from django.contrib.auth.tokens import default_token_generator from django.db.models import Q diff --git a/mezzanine/accounts/templatetags/accounts_tags.py b/mezzanine/accounts/templatetags/accounts_tags.py index f3168a7395..70fc8f60c7 100644 --- a/mezzanine/accounts/templatetags/accounts_tags.py +++ b/mezzanine/accounts/templatetags/accounts_tags.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from collections import OrderedDict from django.contrib.auth import get_user_model diff --git a/mezzanine/accounts/tests.py b/mezzanine/accounts/tests.py index 5d63846cd2..1ac4cb70d7 100644 --- a/mezzanine/accounts/tests.py +++ b/mezzanine/accounts/tests.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from django.core import mail diff --git a/mezzanine/accounts/views.py b/mezzanine/accounts/views.py index be709248fa..74d4b78489 100644 --- a/mezzanine/accounts/views.py +++ b/mezzanine/accounts/views.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.contrib.auth import (login as auth_login, authenticate, logout as auth_logout, get_user_model) from django.contrib.auth.decorators import login_required diff --git a/mezzanine/bin/runtests.py b/mezzanine/bin/runtests.py index e82ed1a65b..90ce92e202 100755 --- a/mezzanine/bin/runtests.py +++ b/mezzanine/bin/runtests.py @@ -1,6 +1,4 @@ #!/usr/bin/env python -from __future__ import unicode_literals - import atexit import os import shutil diff --git a/mezzanine/blog/__init__.py b/mezzanine/blog/__init__.py index 03fc4334ee..46e9a56936 100644 --- a/mezzanine/blog/__init__.py +++ b/mezzanine/blog/__init__.py @@ -2,6 +2,4 @@ Provides a blogging app with posts, keywords, categories and comments. Posts can be listed by month, keyword, category or author. """ -from __future__ import unicode_literals - from mezzanine import __version__ # noqa diff --git a/mezzanine/blog/admin.py b/mezzanine/blog/admin.py index 522a37c946..2166ae872e 100644 --- a/mezzanine/blog/admin.py +++ b/mezzanine/blog/admin.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from copy import deepcopy from django.contrib import admin diff --git a/mezzanine/blog/defaults.py b/mezzanine/blog/defaults.py index 26514e6d79..87bfa2aa45 100644 --- a/mezzanine/blog/defaults.py +++ b/mezzanine/blog/defaults.py @@ -9,8 +9,6 @@ that are only read during startup shouldn't be editable, since changing them would require an application reload. """ -from __future__ import unicode_literals - from django.conf import settings from django.utils.translation import ugettext_lazy as _ diff --git a/mezzanine/blog/feeds.py b/mezzanine/blog/feeds.py index edeeb7bf3d..0189be521c 100644 --- a/mezzanine/blog/feeds.py +++ b/mezzanine/blog/feeds.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed, add_domain diff --git a/mezzanine/blog/forms.py b/mezzanine/blog/forms.py index 1db7c638d9..fc22b8537c 100644 --- a/mezzanine/blog/forms.py +++ b/mezzanine/blog/forms.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from django import forms from mezzanine.blog.models import BlogPost diff --git a/mezzanine/blog/management/base.py b/mezzanine/blog/management/base.py index b88278b4ac..42d1b99d0e 100644 --- a/mezzanine/blog/management/base.py +++ b/mezzanine/blog/management/base.py @@ -1,9 +1,4 @@ -from __future__ import print_function, unicode_literals -from future.builtins import input, int -try: - from urllib.parse import urlparse -except: - from urlparse import urlparse +from urllib.parse import urlparse from django.contrib.auth import get_user_model from django.contrib.redirects.models import Redirect diff --git a/mezzanine/blog/management/commands/import_blogger.py b/mezzanine/blog/management/commands/import_blogger.py index ebfe964cc1..92c7a77682 100644 --- a/mezzanine/blog/management/commands/import_blogger.py +++ b/mezzanine/blog/management/commands/import_blogger.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from datetime import datetime, timedelta from time import timezone import re diff --git a/mezzanine/blog/management/commands/import_posterous.py b/mezzanine/blog/management/commands/import_posterous.py index e6f692b6a6..873816efa0 100644 --- a/mezzanine/blog/management/commands/import_posterous.py +++ b/mezzanine/blog/management/commands/import_posterous.py @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from datetime import datetime import json import time diff --git a/mezzanine/blog/management/commands/import_rss.py b/mezzanine/blog/management/commands/import_rss.py index 72583214f2..9d31883065 100644 --- a/mezzanine/blog/management/commands/import_rss.py +++ b/mezzanine/blog/management/commands/import_rss.py @@ -1,13 +1,8 @@ -from __future__ import unicode_literals - from datetime import timedelta from time import timezone -try: - from urllib.request import urlopen - from urllib.parse import urljoin -except ImportError: - from urllib import urlopen - from urlparse import urljoin + +from urllib.request import urlopen +from urllib.parse import urljoin from django.core.management.base import CommandError diff --git a/mezzanine/blog/management/commands/import_tumblr.py b/mezzanine/blog/management/commands/import_tumblr.py index 3d05edea14..e04a0dedd9 100644 --- a/mezzanine/blog/management/commands/import_tumblr.py +++ b/mezzanine/blog/management/commands/import_tumblr.py @@ -1,15 +1,8 @@ -from __future__ import print_function -from __future__ import unicode_literals -from future.builtins import int - from datetime import datetime from json import loads from time import sleep -try: - from urllib.request import urlopen -except ImportError: - from urllib import urlopen +from urllib.request import urlopen from django.core.management.base import CommandError from django.utils.html import strip_tags diff --git a/mezzanine/blog/management/commands/import_wordpress.py b/mezzanine/blog/management/commands/import_wordpress.py index 85ed271ecb..c7b1069512 100644 --- a/mezzanine/blog/management/commands/import_wordpress.py +++ b/mezzanine/blog/management/commands/import_wordpress.py @@ -1,6 +1,3 @@ -from __future__ import unicode_literals -from future.builtins import int - from collections import defaultdict from datetime import datetime, timedelta import re diff --git a/mezzanine/blog/migrations/0001_initial.py b/mezzanine/blog/migrations/0001_initial.py index 045c98b9f1..b9d3c9ddc4 100644 --- a/mezzanine/blog/migrations/0001_initial.py +++ b/mezzanine/blog/migrations/0001_initial.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals - from django.db import models, migrations import mezzanine.core.fields import mezzanine.utils.models diff --git a/mezzanine/blog/migrations/0002_auto_20150527_1555.py b/mezzanine/blog/migrations/0002_auto_20150527_1555.py index a5cb65cca7..7db9cdd480 100644 --- a/mezzanine/blog/migrations/0002_auto_20150527_1555.py +++ b/mezzanine/blog/migrations/0002_auto_20150527_1555.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals - from django.db import models, migrations diff --git a/mezzanine/blog/migrations/0003_auto_20170411_0504.py b/mezzanine/blog/migrations/0003_auto_20170411_0504.py index c57ae4f3da..ca8683a61a 100644 --- a/mezzanine/blog/migrations/0003_auto_20170411_0504.py +++ b/mezzanine/blog/migrations/0003_auto_20170411_0504.py @@ -1,7 +1,4 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11 on 2017-04-11 05:04 -from __future__ import unicode_literals - from django.db import migrations, models diff --git a/mezzanine/blog/models.py b/mezzanine/blog/models.py index 9bac43a4d4..67838acc67 100644 --- a/mezzanine/blog/models.py +++ b/mezzanine/blog/models.py @@ -1,6 +1,3 @@ -from __future__ import unicode_literals -from future.builtins import str - from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ diff --git a/mezzanine/blog/templates/blog/blog_post_detail.html b/mezzanine/blog/templates/blog/blog_post_detail.html index 24efbd2424..200582275a 100644 --- a/mezzanine/blog/templates/blog/blog_post_detail.html +++ b/mezzanine/blog/templates/blog/blog_post_detail.html @@ -18,7 +18,7 @@ {% block breadcrumb_menu %} {{ block.super }} -
  • {{ blog_post.title }}
  • + {% endblock %} {% block main %} diff --git a/mezzanine/blog/templates/blog/blog_post_list.html b/mezzanine/blog/templates/blog/blog_post_list.html index 8ec0f9584f..32b88a508e 100644 --- a/mezzanine/blog/templates/blog/blog_post_list.html +++ b/mezzanine/blog/templates/blog/blog_post_list.html @@ -26,7 +26,7 @@ {% block breadcrumb_menu %} {{ block.super }} {% if tag or category or year or month or author %} -
  • {% spaceless %} +