8000 fix: #7662, add support for python 3.12 and upgrade github actions by vinitkumar · Pull Request #7680 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: #7662, add support for python 3.12 and upgrade github actions #7680

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
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
fix: some more spell fixes
  • Loading branch information
Vinit Kumar committed Oct 18, 2023
commit 39cfdd120b666da2c4ad3b7c183232ecd3d4d148
2 changes: 1 addition & 1 deletion cms/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
on the models and managers, because the direct API via models and managers is
slightly counterintuitive for developers.

Teh api for both Pages and Plugins has changed significantly since django CMS
The api for both Pages and Plugins has changed significantly since django CMS
Version 4.

Also, the functions defined in this module do sanity checks on arguments.
Expand Down
2 changes: 1 addition & 1 deletion cms/models/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def current_content(self, **kwargs):

def latest_content(self, **kwargs):
"""If a versioning package is installed, returns the latest version that matches the
filter given in kwargs including discared or unpublished page content. Without versioning
filter given in kwargs including discarded or unpublished page content. Without versioning
every page content is the latest."""
return self.filter(**kwargs)

Expand Down
4 changes: 2 additions & 2 deletions cms/models/permissionmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
#: Access to page itself and immediate children (1 level)
ACCESS_PAGE_AND_CHILDREN = 3

#: Access to all children (first level and allso their children)
#: Access to all children (first level and also their children)
ACCESS_DESCENDANTS = 4

#: Access to page itself and all children (first level and allso their children)
#: Access to page itself and all children (first level and also their children)
ACCESS_PAGE_AND_DESCENDANTS = 5

# binary masks for ACCESS permissions
Expand Down
4 changes: 2 additions & 2 deletions cms/models/pluginmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _get_database_cursor(action):
@lru_cache(maxsize=None)
def plugin_supports_cte():
# This has to be as function because when it's a var it evaluates before
# db is connected and we get OperationalError. MySQL version is retrived
# db is connected and we get OperationalError. MySQL version is retrieved
# from db, and it's cached_property.
connection = _get_database_connection('write')
db_vendor = _get_database_vendor('write')
Expand Down Expand Up @@ -480,7 +480,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 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/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: this is just stuff from utils.py - should be splitted / moved
# TODO: this is just stuff from utils.py - should be split / moved

from cms.utils.i18n import (
get_default_language,
Expand Down
2 changes: 1 addition & 1 deletion cms/utils/compat/response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def get_response_headers(response):
"""
Django 3.2+ comes with changes to the repsonse headers and the _headers is not present
Django 3.2+ comes with changes to the response headers and the _headers is not present
in the newer versions. So this method checks if it's present in the response or not, else
returns the newer attribute headers from the response.
"""
Expand Down
6 changes: 3 additions & 3 deletions cms/utils/conf.py
Original file line number Diff line number Diff line change
6D47 Expand Up @@ -131,12 +131,12 @@ def get_toolbar_url__enable():
def get_templates():
if getattr(settings, 'CMS_TEMPLATES_DIR', False):
tpldir = getattr(settings, 'CMS_TEMPLATES_DIR', False)
# CMS_TEMPLATES_DIR can either be a string poiting to the templates directory
# CMS_TEMPLATES_DIR can either be a string pointing to the templates directory
# or a dictionary holding 'site: template dir' entries
if isinstance(tpldir, dict):
tpldir = tpldir[settings.SITE_ID]
# We must extract the relative path of CMS_TEMPLATES_DIR to the neares
# valid templates directory. Here we mimick what the filesystem and
# We must extract the relative path of CMS_TEMPLATES_DIR to the nearest
# valid templates directory. Here we mimic what the filesystem and
# app_directories template loaders do
prefix = ''
# Relative to TEMPLATE['DIRS'] for filesystem loader
Expand Down
2 changes: 1 addition & 1 deletion cms/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __get__(self, owner_self, owner_cls):

def normalize_name(name):
"""
Converts camel-case style names into underscore seperated words. Example::
Converts camel-case style names into underscore separated words. Example::

>>> normalize_name('oneTwoThree')
'one_two_three'
Expand Down
4 changes: 2 additions & 2 deletions cms/utils/placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _scan_placeholders(nodelist, node_class=None, current_block=None, ignore_blo

if ignore_blocks is None:
# List of BlockNode instances to ignore.
# This is important to avoid processing overriden block nodes.
# This is important to avoid processing overridden block nodes.
ignore_blocks = []

for node in nodelist:
Expand Down Expand Up @@ -375,7 +375,7 @@ def get_declared_placeholders_for_obj(obj):


def get_placeholder_from_slot(placeholder_relation: models.Manager, slot: str, template_obj=None) -> Placeholder:
"""Retrieves the placeholder instance for a PlaceholderRelationField either by scaning the template
"""Retrieves the placeholder instance for a PlaceholderRelationField either by scanning the template
of the template_obj (if given) or by creating or getting a Placeholder in the database"""
if hasattr(template_obj, "get_template"):
# Tries to get a placeholder (based on the template for the template_obj
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ skip_glob = cms/admin/__init__.py,cms/models/__init__.py

[codespell]
ignore-words-list = cant,statics
skip = *.js,*.po,./node_modules/*,./.idea/*,./docs/env/*,./docs/build/*,./.env/*,./.venv/*,./build/*,./django_cms.egg-info/*, ./package-lock.json
skip = *.js,*.po,./node_modules/*,./.idea/*,./docs/env/*,./docs/build/*,./.env/*,./.venv/*,./build/*,./django_cms.egg-info/*, ./package-lock.json, ./cms/tests/frontend/coverage/*
0