Skip to content

Commit

Permalink
Merge commit 'ec455aa9067b9f211f271a12e27dc4631d056a5e'
Browse files Browse the repository at this point in the history
* commit 'ec455aa9067b9f211f271a12e27dc4631d056a5e':
  FeinCMS v23.8.0
  It's Image.Resampling.* now
  Add Python 3.11
  Improve interoperability

# Conflicts:
#	feincms/templatetags/feincms_thumbnail.py
  • Loading branch information
Martin J. Laubach committed Sep 21, 2023
2 parents cbc29c3 + ec455aa commit c08c2ae
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ repos:
- id: file-contents-sorter
files: .gitignore
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.13.0
rev: 1.14.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
Expand All @@ -27,16 +27,16 @@ repos:
- id: isort
args: [--profile=black, --lines-after-imports=2, --combine-as]
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E203,E501,W503"]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.35.0
rev: v8.46.0
hooks:
- id: eslint
args: [--fix]
Expand All @@ -48,7 +48,7 @@ repos:
- "@babel/eslint-parser"
- "@babel/preset-env"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
rev: v3.0.1
hooks:
- id: prettier
args: [--list-different, --no-semi]
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ Change log
`Next version`_
~~~~~~~~~~~~~~~

.. _Next version: https://github.com/feincms/feincms/compare/v23.1.0...main
.. _Next version: https://github.com/feincms/feincms/compare/v23.8.0...main


`v23.8.0`_ (2023-08-07)
~~~~~~~~~~~~~~~~~~~~~~~

.. _v23.8.0: https://github.com/feincms/feincms/compare/v23.1.0...v23.8.0

- Made the filter argument of content base's ``get_queryset`` method optional.
This enables easier interoperability of FeinCMS content types with feincms3
plugins.
- Added Python 3.11.
- Fixed the Pillow resampling constant.


`v23.1.0`_ (2023-03-09)
Expand Down
2 changes: 1 addition & 1 deletion feincms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (23, 1, 0)
VERSION = (23, 8, 0)
__version__ = ".".join(map(str, VERSION))


Expand Down
9 changes: 6 additions & 3 deletions feincms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _populate_content_type_caches(self, types):
if cls not in self._cache["cts"]:
if counts:
self._cache["cts"][cls] = list(
cls.get_queryset(
cls.get_queryset().filter(
reduce(
operator.or_,
(Q(region=r[0], parent=r[1]) for r in counts),
Expand Down Expand Up @@ -500,8 +500,11 @@ def render(self, **kwargs):

raise NotImplementedError

def get_queryset(cls, filter_args):
return cls.objects.select_related().filter(filter_args)
def get_queryset(cls, filter_args=None):
qs = cls.objects.select_related()
if filter_args is not None:
return qs.filter(filter_args)
return qs

attrs = {
# The basic content type is put into
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{38,39,310}-dj{32,41,42}
py{310}-dj{32,41,42,main}
py{310,311}-dj{32,41,42,main}

[testenv]
usedevelop = true
Expand All @@ -12,5 +12,5 @@ commands =
deps =
dj32: Django>=3.2,<4.0
dj41: Django>=4.1,<4.2
dj42: Django>=4.2a1,<5.0
dj42: Django>=4.2,<5.0
djmain: https://github.com/django/django/archive/main.tar.gz

0 comments on commit c08c2ae

Please sign in to comment.