8000 ci: Sync release/3.10.x with develop by marksweb · Pull Request #7328 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

ci: Sync release/3.10.x with develop #7328

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 21 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5f4814b
Release 3.10.0 RC1 (#7215)
Feb 1, 2022
c7d4e15
Update release/3.10 from develop (#7219)
marksweb Feb 8, 2022
2f8cb35
Add toolbar fix for broken CMS in the release 3.10.x (#7233)
vinitkumar Feb 10, 2022
3e5227d
fix: using .nvmrc to target teh right nvm version
Mar 5, 2022
822fbab
Release/3.10.x (#7260) Releasing 3.10.0RC2
Mar 5, 2022
d415b84
Update release script to make it compatible with BSD (macos) compatible
marksweb Mar 24, 2022
9e93ac9
Update release script to make it compatible with BSD (macos) compatible
marksweb Mar 24, 2022
7a363eb
Merge remote-tracking branch 'upstream/develop' into develop
marksweb Mar 24, 2022
0aa37dc
Merge remote-tracking branch 'upstream/develop' into develop
marksweb Mar 24, 2022
afd8def
Release/3.10.x (#7275)
Mar 26, 2022
5714a8f
Fixes #7288 by also catching AttributeError, when the current toolbar…
mbi Mar 31, 2022
40a818c
Merge branch 'django-cms:develop' into develop
marksweb Apr 2, 2022
e707f6a
Fix for django 2.2 in middleware [#7290] (#7293)
8000 marksweb Apr 4, 2022
3531372
Update release script to make it compatible with BSD (macos) compatib…
marksweb Apr 4, 2022
5d33733
Merge branch 'django-cms:develop' into develop
marksweb Apr 4, 2022
1cb3dc5
Fix release script version commit. (#7295)
marksweb Apr 4, 2022
20cd347
Merge branch 'django-cms:develop' into develop
marksweb Apr 20, 2022
8914915
Merge branch 'django-cms:develop' into develop
marksweb May 22, 2022
00ab32c
Merge branch 'develop' of github.com:django-cms/django-cms into develop
marksweb May 23, 2022
ce8b47e
Merge branch 'release/3.10.x' into develop
marksweb May 24, 2022
ea18ce1
fix: typos in CHANGELOG.rst
marksweb May 24, 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
8000
7 changes: 3 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changelog
unreleased
==========

* Added dark mode support to css
* Fix publishing of static placeholders outside of CMS pages
* Allow to override the template rendered after a plugin has been saved.

3.10.0 (2022-03-26)
===================
Expand Down Expand Up @@ -72,10 +75,6 @@ With the review help of the following contributors:

Thanks to all contributors for their efforts!

* Added dark mode support to css
* Fix publishing of static placeholders outside of CMS pages
* Allow to override the template rendered after a plugin has been saved.

3.9.0 (2021-06-30)
==================

Expand Down
23 changes: 16 additions & 7 deletions cms/middleware/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from django.utils.deprecation import MiddlewareMixin
from django.utils.translation import get_language

from cms.utils.compat import DJANGO_3_0


class LanguageCookieMiddleware(MiddlewareMixin):
def __init__(self, get_response):
Expand All @@ -18,14 +20,21 @@ def __call__(self, request):
# To ensure support of very old browsers, Django processed automatically "expires" according to max_age value.
# https://docs.djangoproject.com/en/3.2/ref/request-response/#django.http.HttpResponse.set_cookie

cookie_kwargs = {
'value': language,
'domain': settings.LANGUAGE_COOKIE_DOMAIN,
'max_age': settings.LANGUAGE_COOKIE_AGE or 365 * 24 * 60 * 60, # 1 year
'path': settings.LANGUAGE_COOKIE_PATH,
}
if DJANGO_3_0:
cookie_kwargs.update({
'httponly': settings.LANGUAGE_COOKIE_HTTPONLY,
'samesite': settings.LANGUAGE_COOKIE_SAMESITE,
'secure': settings.LANGUAGE_COOKIE_SECURE,
})

response.set_cookie(
settings.LANGUAGE_COOKIE_NAME,
value=language,
domain=settings.LANGUAGE_COOKIE_DOMAIN,
max_age=settings.LANGUAGE_COOKIE_AGE or 365 * 24 * 60 * 60, # 1 year
httponly=settings.LANGUAGE_COOKIE_HTTPONLY,
path=settings.LANGUAGE_COOKIE_PATH,
samesite=settings.LANGUAGE_COOKIE_SAMESITE,
secure=settings.LANGUAGE_COOKIE_SECURE,
**cookie_kwargs
)
return response
4 changes: 2 additions & 2 deletions cms/toolbar/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ def get_object_draft_url(self):
with force_language(self.request_language):
try:
return self.obj.get_draft_url()
except NoReverseMatch:
except (NoReverseMatch, AttributeError):
try:
return self.obj.get_absolute_url()
except NoReverseMatch:
except (NoReverseMatch, AttributeError):
pass
return ''

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade/3.10.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Bug Fixes:
* Fix styles issues, caused by switching to the ``display: flex`` on the page tree renderer.
* Fixed missing builtin arguments on main ``cms`` management command causing it to crash
* Fixed template label nested translation
* Fixed a bug where the fallback page title would be returned instead of the one from the current language
* Fixed a bug where the fallback page title would be returned instead of the one from the current language
* Fixed an issue when running migrations on a multi database project


Expand Down
0