8000 build: Prepare v3.11.2 by merging develop into release/3.11.x by fsbraun · Pull Request #7525 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

build: Prepare v3.11.2 by merging develop into release/3.11.x #7525

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 78 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
78 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
abc 8000 6e6c
fix: default light mode (#7381)
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
3e4bad2
build: bump pillow from 8.3.2 to 9.3.0 in /test_requirements (#7443)
dependabot[bot] Nov 22, 2022
c68eed1
build: bump loader-utils from 1.4.0 to 1.4.2 (#7435)
dependabot[bot] Nov 24, 2022
892baa8
build: bump certifi from 2022.6.15 to 2022.12.7 in /docs (#7452)
dependabot[bot] Dec 9, 2022
c25ecc2
ci: Add GitHub action to make a release (#7454)
fsbraun Dec 12, 2022
cbb855a
Update setup.py (#7462)
fsbraun Dec 21, 2022
0c75223
build: bump minimatch from 3.0.4 to 3.1.2 (#7453)
dependabot[bot] Dec 24, 2022
1cd5b1a
build: bump wheel from 0.37.1 to 0.38.1 in /docs (#7463)
dependabot[bot] Dec 27, 2022
2aa2f89
build: bump decode-uri-component from 0.2.0 to 0.2.2 (#7451)
dependabot[bot] Dec 27, 2022
7132ee3
fix: cms-messages background color (#7465)
fsbraun Dec 29, 2022
6443da8
ci: Update develop with 3.11.1 release (#7469)
fsbraun Jan 5, 2023
fdda2a2
ci: Add deprecations for functions not available in cms v4 (#7458)
fsbraun Jan 6, 2023
8c91e33
fix: Build docs always from the current local version (#7472)
fsbraun Jan 10, 2023
6860a13
ci: Add CodeQL workflow for GitHub code scanning (#7432)
lgtm-com[bot] Jan 10, 2023
99e9ab0
feat: add download statistics to readme (#7474)
fsbraun Jan 11, 2023
2cd93e9
docs: Added note to publish_pages API docs about it being a generator…
jasperbok Jan 22, 2023
5135ca3
fix: Link both user and group from global page permissions to change …
fsbraun Jan 24, 2023
6a96b7c
Make messages readable in dark mode, remove iOS9 compatibility trick …
fsbraun Jan 24, 2023
99c8843
fix: replace ' by ′ in fr translation − no more "page d\u0027accueil"…
corentinbettiol Jan 25, 2023
ff94c5d
fix/merge_errors (#7487)
fsbraun Jan 27, 2023
86a9a14
docs: Update formatting in how-to/install.rst to avoid misunderstandi…
fsbraun Feb 5, 2023
4d7ed46
feat: add setting so redirect preserve params (#7489)
igobranco Feb 7, 2023
c7fc2f2
improved code readability (#7503)
deepbluesquirrel Feb 13, 2023
7e852ec
feat: add setting to redirect slugs to lowercase (#7509)
pajowu Mar 8, 2023
31ea031
docs: Update incomplete color scheme docs (#7512)
fsbraun Mar 23, 2023
9e33167
fix typos (#7514)
wasertech Mar 28, 2023
89a42dd
feat: add django 4.2 support (#7481)
Apr 10, 2023
4c0b3a8
ci: more deprecations in light of upcoming v4 (#7480)
fsbraun Apr 10, 2023
ceadcaa
ci: introduce ruff in place of flake8 for improved speed (#7504)
vinitkumar Apr 10, 2023
25b2303
feat: add download statistics to readme (#7474)
fsbraun Jan 11, 2023
ca8f75b
docs: Added note to publish_pages API docs about it being a generator…
jasperbok Jan 22, 2023
6cb4762
fix: Link both user and group from global page permissions to change …
fsbraun Jan 24, 2023
bdd10ae
Make messages readable in dark mode, remove iOS9 compatibility trick …
fsbraun Jan 24, 2023
b4acc9a
fix: replace ' by ′ in fr translation − no more "page d\u0027accueil"…
corentinbettiol Jan 25, 2023
45e78dd
docs: Update formatting in how-to/install.rst to avoid misunderstandi…
fsbraun Feb 5, 2023
dcb9c4b
feat: add setting so redirect preserve params (#7489)
igobranco Feb 7, 2023
327a86f
improved code readability (#7503)
deepbluesquirrel Feb 13, 2023
01aedee
feat: add setting to redirect slugs to lowercase (#7509)
pajowu Mar 8, 2023
9a3d647
docs: Update incomplete color scheme docs (#7512)
fsbraun Mar 23, 2023
04a85d3
fix typos (#7514)
wasertech Mar 28, 2023
5478faa
feat: add django 4.2 support (#7481)
Apr 10, 2023
187ea98
ci: more deprecations in light of upcoming v4 (#7480)
fsbraun Apr 10, 2023
6833976
ci: introduce ruff in place of flake8 for improved speed (#7504)
vinitkumar Apr 10, 2023
f57d516
Merge branch 'develop' of github.com:fsbraun/django-cms into fsbraun-…
fsbraun Apr 16, 2023
41da65d
Merge branch 'fsbraun-develop' into develop
fsbraun Apr 16, 2023
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
ci: Added codespell (#7355)
Co-authored-by: Christian Clauss <cclauss@me.com>

* ci: codespell config taken from #7292
  • Loading branch information
marksweb authored Jul 3, 2022
commit c1290c9ff89cb00caa5469129fd527e9d82cd820
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: "3.10"
cache: 'pip'
- name: Cache dependencies
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: "3.10"
cache: 'pip'
- run: pip install --upgrade flake8
- name: flake8
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: "3.10"
cache: 'pip'
- run: python -m pip install isort
- name: isort
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: django CMS spelling

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
codespell:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: python -m pip install codespell
- name: codespell
uses: codespell-project/actions-codespell@master
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ repos:
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
7 changes: 4 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ unreleased
* Fix edit plugin popup width (remove 850px width constraint).
* Fix except block using list instead of tuple. (#7334)
* Added cache ttl extension point.
* Added spell checking to pre-commit and github workflows

3.10.1 (2022-06-28)
===================
Expand Down Expand Up @@ -152,7 +153,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 whould 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
* Fixes #7033: also check for Django 3.2, now that 3.9 supports it. (#7054) (02083f2dc) -- Marco Bonetti

Expand Down Expand Up @@ -253,7 +254,7 @@ Thanks to all contributors for their efforts!
* Fixed an issue in ``wizards/create.html`` where the error message did not use the plural form
* Improved documentation building
* Updated the content for django CMS’s development community
* Replaced all occurences of ``force_text`` and ``smart_text`` against
* Replaced all occurrences of ``force_text`` and ``smart_text`` against
``force_str``and ``smart_str``.


Expand Down Expand Up @@ -791,7 +792,7 @@ Thanks to all contributors for their efforts!
- Substantial improvements to the page tree and significant reduction of reloads
- Update jsTree version to 3.2.1 with slight adaptions to the Pagetree
- Documentation improvements
- Improve the display and useability of the language menu, especially in cases
- Improve the display and usability of the language menu, especially in cases
where there are many languages.
- Fix an issue relating to search fields in plugins
- Fix an issue where the app-resolver would trigger locales into migrations
Expand Down
8 changes: 4 additions & 4 deletions cms/cms_menus.py
10000
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_menu_node_for_page(renderer, page, language, fallbacks=None):
if fallbacks is None:
fallbacks = []

# Theses are simple to port over, since they are not calculated.
# These are simple to port over, since they are not calculated.
# Other attributes will be added conditionally later.
attr = {
'is_page': True,
Expand All @@ -103,8 +103,8 @@ def get_menu_node_for_page(renderer, page, language, fallbacks=None):
if page.navigation_extenders:
if page.navigation_extenders in renderer.menus:
extenders.append(page.navigation_extenders)
elif "{0}:{1}".format(page.navigation_extenders, page.pk) in renderer.menus:
extenders.append("{0}:{1}".format(page.navigation_extenders, page.pk))
elif f"{page.navigation_extenders}:{page.pk}" in renderer.menus:
extenders.append(f"{page.navigation_extenders}:{page.pk}")
# Is this page an apphook? If so, we need to handle the apphooks's nodes
# Only run this if we have a translation in the requested language for this
# object. The title cache should have been prepopulated in CMSMenu.get_nodes
Expand All @@ -120,7 +120,7 @@ def get_menu_node_for_page(renderer, page, language, fallbacks=None):
if hasattr(ext, "get_instances"):
# CMSAttachMenus are treated a bit differently to allow them to be
# able to be attached to multiple points in the navigation.
exts.append("{0}:{1}".format(ext.__name__, page.pk))
exts.append(f"{ext.__name__}:{page.pk}")
elif hasattr(ext, '__name__'):
exts.append(ext.__name__)
else:
Expand Down
18 changes: 9 additions & 9 deletions cms/models/pluginmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PluginModelBase(ModelBase):
"""

def __new__(cls, name, bases, attrs):
super_new = super(PluginModelBase, cls).__new__
super_new = super().__new__
# remove RenderMeta from the plugin class
attr_meta = attrs.pop('RenderMeta', None)

Expand Down Expand Up @@ -237,14 +237,14 @@ def get_instance_icon_src(self):
Get src URL for instance's icon
"""
instance, plugin = self.get_plugin_instance()
return plugin.icon_src(instance) if instance else u''
return plugin.icon_src(instance) if instance else ''

def get_instance_icon_alt(self):
"""
Get alt text for instance's icon
"""
instance, plugin = self.get_plugin_instance()
return force_str(plugin.icon_alt(instance)) if instance else u''
return force_str(plugin.icon_alt(instance)) if instance else ''

def update(self, refresh=False, **fields):
CMSPlugin.objects.filter(pk=self.pk).update(**fields)
Expand Down Expand Up @@ -356,7 +356,7 @@ def fix_tree(cls, destructive=False):
"""
from cms.utils.plugins import reorder_plugins

super(CMSPlugin, cls).fix_tree(destructive)
super().fix_tree(destructive)
for placeholder in Placeholder.objects.all():
for language, __ in settings.LANGUAGES:
order = CMSPlugin.objects.filter(
Expand Down Expand Up @@ -421,29 +421,29 @@ def get_breadcrumb(self):
try:
url = force_str(
admin_reverse(
"%s_%s_edit_plugin" % (model._meta.app_label, model._meta.model_name),
f"{model._meta.app_label}_{model._meta.model_name}_edit_plugin",
args=[parent.pk]
)
)
except NoReverseMatch:
url = force_str(
admin_reverse(
"%s_%s_edit_plugin" % (Page._meta.app_label, Page._meta.model_name),
f"{Page._meta.app_label}_{Page._meta.model_name}_edit_plugin",
args=[parent.pk]
)
)
breadcrumb.append({'title': force_str(parent.get_plugin_name()), 'url': url})
try:
url = force_str(
admin_reverse(
"%s_%s_edit_plugin" % (model._meta.app_label, model._meta.model_name),
f"{model._meta.app_label}_{model._meta.model_name}_edit_plugin",
args=[self.pk]
)
)
except NoReverseMatch:
url = force_str(
admin_reverse(
"%s_%s_edit_plugin" % (Page._meta.app_label, Page._meta.model_name),
f"{Page._meta.app_label}_{Page._meta.model_name}_edit_plugin",
args=[self.pk]
)
)
Expand Down Expand Up @@ -526,7 +526,7 @@ def get_plugin_media_path(instance, filename):
Django requires that unbound function used in fields' definitions to be
defined outside the parent class.
(see https://docs.djangoproject.com/en/dev/topics/migrations/#serializing-values)
This function is used withing 93C6 field definition:
This function is used within field definition:

file = models.FileField(_("file"), upload_to=get_plugin_media_path)

Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/sass/components/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
width: 100%;
}

// other styles that might be used by components accross the components
// other styles that might be used by components across the components
.cms-prevent-scrolling {
overflow: hidden !important;
body {
Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/sass/components/_sideframe.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
}

// when resizing the sideframe shime get's z-index between frame
// when resizing the sideframe shime gets z-index between frame
// and resize in order for mouse events not to trigger on iframe, same as
// with modal
.cms-sideframe-shim {
Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/sass/components/pagetree/_tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@
// parent and children ul
.jstree-container-ul,
.jstree-children,
// children and childrens children li
// children and children's children li
.jstree-leaf,
.jstree-node {
list-style-type: none;
Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/sass/mixins/_zindex.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// #############################################################################
// ZINDEX

// handle z-index mor easily
// handle z-index more easily
// DOCS: http://www.sitepoint.com/better-solution-managing-z-index-sass/
// http://sassmeister.com/gist/341c052928c956c1a751
// use case: header { z-index: z("modal", "header"); }
Expand Down
2 changes: 1 addition & 1 deletion cms/static/cms/sass/settings/_cms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ $z-layers: (
"fixed-headers": 2,
"container": 1,
),
// parent dependant, but should be higher than quicksearch, but
// parent dependent, but should be higher than quicksearch, but
// lower than dropdown
"hovertooltip": 1001,
"screenblock": 100,
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/cms/toolbar/toolbar_javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'debug': '{% filter escapejs %}{% blocktrans %}Development version using django CMS {{ cms_version }}, Django {{ django_version }}, Python {{ python_version }}{% endblocktrans %}{% endfilter %}',
{% endif %}
'cancel': '{% filter escapejs %}{% trans "Cancel" %}{% endfilter %}',
'error': '<strong>{% filter escapejs %}{% trans "The following error occured:" %}{% endfilter %}</strong> ',
'error': '<strong>{% filter escapejs %}{% trans "The following error occurred:" %}{% endfilter %}</strong> ',
'success': '{% filter escapejs %}{% trans "Action successful." %}{% endfilter %}',
'confirm': '{% filter escapejs %}{% trans "Are you sure you want to delete this plugin?" %}{% endfilter %}',
'publish': '{% filter escapejs %}{% trans "Are you sure you want to publish this page?" %}{% endfilter %}',
Expand Down
22 changes: 11 additions & 11 deletions cms/templatetags/cms_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_value_for_context(self, context, **kwargs):
# return Exceptions regardless of the setting of settings.DEBUG.
#
# We wish to maintain backwards functionality where the non-as-variant
# of using this tag will raise DNE exceptions only when
# of using this tag will raise DoesNotExist exceptions only when
# settings.DEBUG=False.
#
try:
Expand Down Expand Up @@ -492,7 +492,7 @@ def render_tag(self, context, **kwargs):
def _get_editable_context(self, context, instance, language, edit_fields,
view_method, view_url, querystring, editmode=True):
"""
Populate the contex with the requested attributes to trigger the changeform
Populate the context with the requested attributes to trigger the change form
"""
request = context['request']
if hasattr(request, 'toolbar'):
Expand All @@ -508,16 +508,16 @@ def _get_editable_context(self, context, instance, language, edit_fields,
with force_language(lang):
extra_context = {}
if edit_fields == 'changelist':
instance.get_plugin_name = "%s %s list" % (smart_str(_('Edit')), smart_str(opts.verbose_name))
instance.get_plugin_name = "{} {} list".format(smart_str(_('Edit')), smart_str(opts.verbose_name))
extra_context['attribute_name'] = 'changelist'
elif editmode:
instance.get_plugin_name = "%s %s" % (smart_str(_('Edit')), smart_str(opts.verbose_name))
instance.get_plugin_name = "{} {}".format(smart_str(_('Edit')), smart_str(opts.verbose_name))
if not context.get('attribute_name', None):
# Make sure CMS.Plugin object will not clash in the frontend.
extra_context['attribute_name'] = '-'.join(edit_fields) \
if not isinstance('edit_fields', str) else edit_fields
else:
instance.get_plugin_name = "%s %s" % (smart_str(_('Add')), smart_str(opts.verbose_name))
instance.get_plugin_name = "{} {}".format(smart_str(_('Add')), smart_str(opts.verbose_name))
extra_context['attribute_name'] = 'add'
extra_context['instance'] = instance
extra_context['generic'] = opts
Expand All @@ -535,28 +535,28 @@ def _get_editable_context(self, context, instance, language, edit_fields,
# The default view_url is the default admin changeform for the
# current instance
if not editmode:
view_url = 'admin:%s_%s_add' % (
view_url = 'admin:{}_{}_add'.format(
opts.app_label, opts.model_name)
url_base = reverse(view_url)
elif not edit_fields:
if not view_url:
view_url = 'admin:%s_%s_change' % (
view_url = 'admin:{}_{}_change'.format(
opts.app_label, opts.model_name)
if isinstance(instance, Page):
url_base = reverse(view_url, args=(instance.pk, language))
else:
url_base = reverse(view_url, args=(instance.pk,))
else:
if not view_url:
view_url = 'admin:%s_%s_edit_field' % (
view_url = 'admin:{}_{}_edit_field'.format(
opts.app_label, opts.model_name)
if view_url.endswith('_changelist'):
url_base = reverse(view_url)
else:
url_base = reverse(view_url, args=(instance.pk, language))
querystring['edit_fields'] = ",".join(context['edit_fields'])
if editmode:
extra_context['edit_url'] = "%s?%s" % (url_base, urlencode(querystring))
extra_context['edit_url'] = f"{url_base}?{urlencode(querystring)}"
else:
extra_context['edit_url'] = "%s" % url_base
extra_context['refresh_page'] = True
Expand Down Expand Up @@ -654,13 +654,13 @@ def _get_empty_context(self, context, instance, edit_fields, language,
edit_fields = 'title,page_title,menu_title'
view_url = 'admin:cms_page_edit_title_fields'
if edit_fields == 'changelist':
view_url = 'admin:%s_%s_changelist' % (
view_url = 'admin:{}_{}_changelist'.format(
instance._meta.app_label, instance._meta.model_name)
querystring = OrderedDict((('language', language),))
if edit_fields:
extra_context['edit_fields'] = edit_fields.strip().split(",")
# If the toolbar is not enabled the following part is just skipped: it
# would cause a perfomance hit for no reason
# would cause a performance hit for no reason
if self._is_editable(context.get('request', None)):
extra_context.update(self._get_editable_context(
extra_context, instance, language, edit_fields, view_method,
Expand Down
2 changes: 1 addition & 1 deletion cms/test_utils/project/emailuserapp/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ def clean_password(self):
"""
Regardless of what the user provides, return the initial value.
This is done here, rather than on the field, because the
field does not have access to the inital value.
field does not have access to the initial value.
"""
return self.initial["password"]
3 changes: 1 addition & 2 deletions cms/test_utils/project/mti_pluginapp/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from django.db import models

from cms.models import CMSPlugin
Expand Down Expand Up @@ -41,7 +40,7 @@ class Meta:
class TestPluginBetaModel(TestPluginAlphaModel):
"""
NOTE: This is the subject of our test. A plugin which inherits from
another concrete plugin via MTI or Multi-Table Inheritence.
another concrete plugin via MTI or Multi-Table Inheritance.
"""
beta = models.CharField('name', blank=False, default='test plugin beta', max_length=32)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import itertools

from cms.plugin_base import CMSPluginBase
Expand All @@ -16,7 +15,7 @@ class DynamicJsLoadingPlugin(CMSPluginBase):
def render(self, context, instance, placeholder):
"""
This generates a list of all 16 class usage permutations.
originaly from https://stackoverflow.com/a/54059999
originally from https://stackoverflow.com/a/54059999
>>> import itertools
>>> l=[False,True]
>>> list(itertools.product(l,repeat=4))
Expand Down Expand Up @@ -45,7 +44,7 @@ def render(self, context, instance, placeholder):
*case_list[instance.testcase - 1]
)

return super(DynamicJsLoadingPlugin, self).render(
return super().render(
context, instance, placeholder
)

Expand Down
4 changes: 2 additions & 2 deletions cms/test_utils/project/sampleapp/cms_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_config(self, namespace):
return None

def get_config_add_url(self):
return reverse('admin:%s_%s_add' % (self.app_config._meta.app_label, self.app_config._meta.model_name))
return reverse(f'admin:{self.app_config._meta.app_label}_{self.app_config._meta.model_name}_add')


class SampleAppWithExcludedPermissions(CMSApp):
Expand All @@ -70,7 +70,7 @@ def get_urls(self, page=None, language=None, **kwargs):


class SampleApp3(CMSApp):
# CMSApp which returns the url directly rather than trough another Python module
# CMSApp which returns the url directly rather than through another Python module
name = _("Sample App 3")

def get_urls(self, page=None, language=None, **kwargs):
Expand Down
Loading
0