8000 feat: Release/3.11.1 by fsbraun · Pull Request #7431 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

feat: Release/3.11.1 #7431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
28f45b6
ci: stale bot added (#7298)
marksweb Jun 29, 2022
c1290c9
ci: Added codespell (#7355)
marksweb Jul 3, 2022
d5a9f49
fix: Added language to page cache key (#7354)
marksweb Jul 3, 2022
b80b4de
ci: Remove a superfluous installation of codespell (#7356)
cclauss Jul 3, 2022
908b800
build: bump django from 3.2.13 to 3.2.14 in /docs (#7358)
dependabot[bot] Jul 6, 2022
9948c68
typo (#7360)
Husseinfo Jul 14, 2022
3c7c9bd
Update install.rst (#7368)
dapoadedire Jul 24, 2022
3b2dc10
ci: Flake8 fixes (#7372)
marksweb Aug 1, 2022
3c01311
build: bump django from 3.2.14 to 3.2.15 in /docs (#7379)
dependabot[bot] Aug 11, 2022
abc6e6c
fix: default light mode (#7381) 8000
viliammihalik Aug 15, 2022
fef9158
ci: Merging release/3.11.0 (#7377)
marksweb Aug 19, 2022
9858b77
docs: Bump requirements (#7382)
marksweb Sep 3, 2022
cdcf260
fix: CMS check management command fixed [#7386]
mbi Sep 12, 2022
b8750eb
ci: sync isort line length (#7353)
marksweb Sep 12, 2022
1ec5698
docs: fixing a link (#7393)
shivan-s Sep 16, 2022
a7f8cd4
refactor: Move js API functions to CMS.Helpers to make them available…
fsbraun Sep 27, 2022
162ff8d
fix: Allow partially overriding CMS_CACHE_DURATIONS (#7339)
eagleoflqj Oct 8, 2022
49bd066
Adjust paste label in pt-br locale (#7376)
wesleysima Oct 8, 2022
0fd058e
feat: Add support for tel: and mailto: URIs in Advanced Page Settings…
marksweb Oct 8, 2022
6d83a9f
docs: Correction of headings around CMSPlugin & CMSPluginBase (#7406)
cagejsn Oct 9, 2022
9e3c579
fix: Unlocalize page and node ids when rendering the page tree in the…
mbi Oct 9, 2022
e59c179
fix: Clear page permission cache on page create (#6866)
g3rb3n Oct 12, 2022
fcfe77f
fix: Changing color scheme resets session settings to defaults (#7407)
fsbraun Oct 14, 2022
64ae4ad
ci: Added pre-commit ci config (#7409)
marksweb Oct 16, 2022
7ca1b61
perf: Don't count users when CMS_RAW_ID_USERS=True (#7414)
fsbraun Oct 20, 2022
dcf394b
fix: CMS check management command fixed [#7412] (#7413)
ton77v Oct 20, 2022
27515cc
ci: Some tests misusing assertTrue for comparisons fix (#7241)
code-review-doctor Oct 20, 2022
777864a
feat: Support for Django 4.1 (#7404)
fsbraun Oct 21, 2022
7cc6e78
build: bump django from 3.2.15 to 3.2.16 in /docs (#7417)
dependabot[bot] Oct 26, 2022
068e115
build: bump minimatch and gulp-if (#7416)
dependabot[bot] Oct 26, 2022
2788f75
fix: Added deprecation warning to `get_current_language()` (#7410)
marksweb Oct 29, 2022
3fe1449
feat: add Python 3.11 support for Django CMS (#7422)
Oct 30, 2022
d38f4a1
fix: Adds a deprecation warning for SEND_BROKEN_LINK_EMAILS (#7420)
fsbraun Nov 3, 2022
06c9a85
fix: Prefer titles matching request language (#7144)
macro1 Nov 4, 2022
5f8e7da
Merge branch 'release/3.11.x' into develop
fsbraun Nov 5, 2022
dd0c10b
Merge pull request #4 from fsbraun/develop
fsbraun Nov 5, 2022
c0c7a80
[3.11.1rc1 release process] Building locales
fsbraun Nov 5, 2022
23b9136
[3.11.1rc1 release process] Bumped version to 3.11.1rc1
fsbraun Nov 5, 2022
532dd71
[3.11.1rc1 release process] compilemessages
fsbraun Nov 5, 2022
37438bc
[3.11.1rc1 release process] compiling new static files
fsbraun Nov 5, 2022
60f4a25
[3.11.1rc1 release process] updating latest docs
fsbraun Nov 5, 2022
45a6924
Update and rename .rst to 3.11.1.rst
fsbraun Nov 5, 2022
425e6cd
Update 3.11.1.rst
fsbraun Nov 5, 2022
90c222b
Update index.rst
fsbraun Nov 5, 2022
aa51ec8
[3.11.1rc1 release process] Building locales
fsbraun Nov 5, 2022
7c691c2
Update 3.11.1.rst
fsbraun Nov 5, 2022
8489a02
Update index.rst
fsbraun Nov 5, 2022
85e7a87
Update index.rst
fsbraun Nov 5, 2022
3400424
Update index.rst
fsbraun Nov 5, 2022
3dd049b
Update index.rst
fsbraun Nov 5, 2022
e755eba
Update index.rst
fsbraun Nov 5, 2022
795e11a
Fix: Allow setup to run before dependencies are installed
fsbraun Nov 6, 2022
c8e45d1
Merge branch 'release/3.11.x' of github.com:fsbraun/django-cms into r…
fsbraun Nov 6, 2022
74830d1
Update transifex translations
fsbraun Nov 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Support for Django 4.1 (#7404)
* support: Django 4.1
* Fix: apphook test
* Run tests on all databases

Co-authored-by: Vinit Kumar <mail@vinitkumar.me>
Co-authored-by: Mark Walker <theshow@gmail.com>
  • Loading branch information
3 people authored Oct 21, 2022
commit 777864af374a75398af3e0ffddf28282703bb123
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
django-3.1.txt,
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
]
os: [
ubuntu-20.04,
Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:
django-3.1.txt,
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
]
os: [
ubuntu-20.04,
Expand Down Expand Up @@ -123,6 +125,7 @@ jobs:
django-3.1.txt,
django-3.2.txt,
django-4.0.txt,
django-4.1.txt,
]
os: [
ubuntu-20.04,
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
unreleased
==========

* Support for django 4.1
* Allow to partially override ``CMS_CACHE_DURATIONS``
* Add support for tel: and mailto: URIs in Advanced Page Settings redirect field.
* Make javascript dark mode functions available to popups as CMS.API.getColorScheme
Expand Down
9 changes: 6 additions & 3 deletions cms/models/pagemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,14 @@ def save_base(self, *args, **kwargs):
PUBLISHER_STATE_DEFAULT (in publish method).
"""
keep_state = getattr(self, '_publisher_keep_state', None)
if self.publisher_is_draft and not keep_state and self.is_new_dirty():
self.title_set.all().update(publisher_state=PUBLISHER_STATE_DIRTY)
is_new_dirty = self.is_new_dirty()
if keep_state:
delattr(self, '_publisher_keep_state')
return super().save_base(*args, **kwargs)
result = super().save_base(*args, **kwargs)
if self.publisher_is_draft and not keep_state and is_new_dirty:
# As of Django 4.1 only possible after self has been saved.
self.title_set.all().update(publisher_state=PUBLISHER_STATE_DIRTY)
return result

def update(self, refresh=False, draft_only=True, **data):
assert self.publisher_is_draft
Expand Down
6 changes: 3 additions & 3 deletions cms/templatetags/cms_admin.py
< 6D40 td class="blob-code blob-code-context js-file-line">
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def render_tag(self, context, page, language):
)


register.tag(TreePublishRow)
register.tag("tree_publish_row", TreePublishRow)

@register.filter
Expand Down Expand Up @@ -191,7 +191,7 @@ def get_context(self, context):
return context


register.tag(PageSubmitRow)
register.tag("page_submit_row", PageSubmitRow)


def in_filtered(seq1, seq2):
Expand All @@ -217,7 +217,7 @@ def render_tag(self, context):
return CMS_ADMIN_ICON_BASE


register.tag(CMSAdminIconBase)
register.tag("cms_admin_icon_base", CMSAdminIconBase)


@register.inclusion_tag('admin/cms/page/plugin/submit_line.html', takes_context=True)
Expand Down
2 changes: 1 addition & 1 deletion cms/templatetags/cms_js_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ def render_tag(self, context, **kwargs):
return "'%s'" % escapejs(rendered.strip())


register.tag(JavascriptString)
register.tag("javascript_string", JavascriptString)
3 changes: 2 additions & 1 deletion cms/tests/test_apphooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from cms.test_utils.testcases import CMSTestCase
from cms.tests.test_menu_utils import DumbPageLanguageUrl
from cms.toolbar.toolbar import CMSToolbar
from cms.utils.compat import DJANGO_2_2, DJANGO_3
from cms.utils.conf import get_cms_setting
from cms.utils.urlutils import admin_reverse
from menus.menu_pool import menu_pool
Expand Down Expand Up @@ -306,7 +307,7 @@ def test_apphook_permissions_preserves_view_name(self):
view_names = (
('sample-settings', 'sample_view'),
('sample-class-view', 'ClassView'),
('sample-class-based-view', 'ClassBasedView'),
('sample-class-based-view', 'view' if not (DJANGO_3 or DJANGO_2_2) else 'ClassBasedView' ),
)

with force_language("en"):
Expand Down
17 changes: 9 additions & 8 deletions cms/tests/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

from django.conf import settings
from django.test.utils import override_settings
from django.utils.translation import LANGUAGE_SESSION_KEY

from cms import api
from cms.test_utils.testcases import CMSTestCase
from cms.utils import get_language_from_request, i18n
from cms.utils.compat import DJANGO_3_0, DJANGO_3_1, DJANGO_3_2
from cms.utils.compat import DJANGO_2_2


@override_settings(
Expand Down Expand Up @@ -363,19 +362,21 @@ def test_session_language(self):

# ugly and long set of session
session = self.client.session
if DJANGO_3_0 or DJANGO_3_1 or DJANGO_3_2:
self.client.cookies[settings.LANGUAGE_COOKIE_NAME] = 'fr'
else:
if DJANGO_2_2:
from django.utils.translation import LANGUAGE_SESSION_KEY

session[LANGUAGE_SESSION_KEY] = 'fr'
session.save()
else:
self.client.cookies[settings.LANGUAGE_COOKIE_NAME] = 'fr'
response = self.client.get('/')
self.assertEqual(response.status_code, 302)
self.assertRedirects(response, '/fr/')
self.client.get('/en/')
if DJANGO_3_0 or DJANGO_3_1 or DJANGO_3_2:
self.assertEqual(self.client.cookies[settings.LANGUAGE_COOKIE_NAME].value, 'en')
else:
if DJANGO_2_2:
self.assertEqual(self.client.session[LANGUAGE_SESSION_KEY], 'en')
else:
self.assertEqual(self.client.cookies[settings.LANGUAGE_COOKIE_NAME].value, 'en')
response = self.client.get('/')
self.assertEqual(response.status_code, 302)
self.assertRedirects(response, '/en/')
Expand Down
4 changes: 3 additions & 1 deletion cms/tests/test_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def test_for_missing_migrations(self):
}

try:
call_command('makemigrations', **options)
# Django 4.1 introduces a new migration to djangocms_text_ckeditor
# therefore only check for own migrations
call_command('makemigrations', 'cms', **options)
except SystemExit as e:
status_code = str(e)
else:
Expand Down
12 changes: 7 additions & 5 deletions cms/utils/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from distutils.version import LooseVersion
from platform import python_version

from django import get_version
from packaging.version import Version

DJANGO_VERSION = get_version()
PYTHON_VERSION = python_version()

# These means "less than or equal to DJANGO_FOO_BAR"
DJANGO_2_2 = LooseVersion(DJANGO_VERSION) < LooseVersion('3.0')
DJANGO_3_0 = LooseVersion(DJANGO_VERSION) < LooseVersion('3.1')
DJANGO_3_1 = LooseVersion(DJANGO_VERSION) < LooseVersion('3.2')
DJANGO_3_2 = LooseVersion('3.2') <= LooseVersion(DJANGO_VERSION) and LooseVersion(DJANGO_VERSION) < LooseVersion('3.3')
DJANGO_2_2 = Version(DJANGO_VERSION) < Version('3.0')
DJANGO_3_0 = Version(DJANGO_VERSION) < Version('3.1')
DJANGO_3_1 = Version(DJANGO_VERSION) < Version('3.2')
DJANGO_3_2 = Version(DJANGO_VERSION) < Version('4.0')
DJANGO_3 = DJANGO_3_2
DJANGO_4_1 = Version(DJANGO_VERSION) < Version('4.2')
12 changes: 6 additions & 6 deletions menus/templatetags/menu_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def get_context(self, context, from_level, to_level, extra_inactive,
return context


register.tag(ShowMenu)
register.tag("show_menu", ShowMenu)


class ShowMenuBelowId(ShowMenu):
Expand All @@ -185,7 +185,7 @@ class ShowMenuBelowId(ShowMenu):
)


register.tag(ShowMenuBelowId)
register.tag("show_menu_below_id", ShowMenuBelowId)


class ShowSubMenu(InclusionTag):
Expand Down Expand Up @@ -260,7 +260,7 @@ def get_context(self, context, levels, root_level, nephews, template):
return context


register.tag(ShowSubMenu)
register.tag("show_sub_menu", ShowSubMenu)


class ShowBreadcrumb(InclusionTag):
Expand Down Expand Up @@ -328,7 +328,7 @@ def get_context(self, context, start_level, template, only_visible):
return context


register.tag(ShowBreadcrumb)
register.tag("show_breadcrumb", ShowBreadcrumb)


def _raw_language_marker(language, lang_code):
Expand Down Expand Up @@ -406,7 +406,7 @@ def get_context(self, context, template, i18n_mode):
return context


register.tag(LanguageChooser)
register.tag("language_chooser", LanguageChooser)


class PageLanguageUrl(InclusionTag):
Expand Down Expand Up @@ -439,4 +439,4 @@ def get_context(self, context, lang):
return {'content': url}


register.tag(PageLanguageUrl)
register.tag("page_language_url", PageLanguageUrl)
2 changes: 1 addition & 1 deletion test_requirements/django-4.0.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r requirements_base.txt
Django==4.0.1
Django==4.0
django-formtools==2.2
pyenchant==3.0.1
4 changes: 4 additions & 0 deletions test_requirements/django-4.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements_base.txt
Django==4.1
django-formtools==2.2
pyenchant==3.0.1
0