Skip to content

Commit

Permalink
Merge branch 'master' into feat/universal
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed May 22, 2024
2 parents fff7f64 + 7cc80ba commit ba7c8ed
Show file tree
Hide file tree
Showing 24 changed files with 275 additions and 93 deletions.
18 changes: 0 additions & 18 deletions .coveragerc

This file was deleted.

5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ Use 'x' to check each item: [x] I have ...
* [ ] I have opened this pull request against ``master``
* [ ] I have added or modified the tests when changing logic
* [ ] I have followed [the conventional commits guidelines](https://www.conventionalcommits.org/) to add meaningful information into the changelog
* [ ] I have read the [contribution guidelines ](https://github.com/django-cms/django-cms/blob/develop/CONTRIBUTING.rst) and I have joined #workgroup-pr-review on
[Slack](https://www.django-cms.org/slack) to find a “pr review buddy” who is going to review my pull request.
* [ ] I have read the [contribution guidelines ](https://github.com/django-cms/django-cms/blob/develop/CONTRIBUTING.rst) and I have joined #pr-review on
[Discord](https://discord-pr-review-channel.django-cms.org/) to find a “pr review buddy” who is
going to review my pull request.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down
2 changes: 1 addition & 1 deletion aldryn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Form(forms.BaseForm):
required=False,
)
enable_search = forms.CheckboxField(
'Enable snippet content to be searchable.',
"Enable snippet content to be searchable.",
required=False,
initial=False,
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "djangocms-snippet"
version = "4.1.0"
dynamic = ["version"]
authors = [
{name = "Divio AG", email = "[email protected]"},
]
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bump2version
https://github.com/django-cms/django-cms/tarball/release/4.0.1.x#egg=django-cms
django-cms>=3.7
django-treebeard
pip-tools
pre-commit
Expand Down
33 changes: 18 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile
# pip-compile --output-file=requirements.txt requirements.in
#
asgiref==3.7.2
asgiref==3.8.1
# via django
build==1.1.1
build==1.2.1
# via pip-tools
bump2version==1.0.1
# via -r requirements.in
Expand All @@ -16,7 +16,7 @@ click==8.1.7
# via pip-tools
distlib==0.3.8
# via virtualenv
django==4.2.11
django==4.2.13
# via
# django-classy-tags
# django-cms
Expand All @@ -28,7 +28,7 @@ django-classy-tags==4.1.0
# via
# django-cms
# django-sekizai
django-cms @ https://github.com/django-cms/django-cms/tarball/release/4.0.1.x
django-cms==4.1.1
# via -r requirements.in
django-formtools==2.5.1
# via django-cms
Expand All @@ -40,10 +40,12 @@ django-treebeard==4.7.1
# django-cms
djangocms-admin-style==3.3.1
# via django-cms
filelock==3.13.1
filelock==3.14.0
# via virtualenv
identify==2.5.35
identify==2.5.36
# via pre-commit
importlib-metadata==7.1.0
# via build
nodeenv==1.8.0
# via pre-commit
packaging==24.0
Expand All @@ -52,31 +54,32 @@ packaging==24.0
# django-cms
pip-tools==7.4.1
# via -r requirements.in
platformdirs==4.2.0
platformdirs==4.2.2
# via virtualenv
pre-commit==3.6.2
pre-commit==3.7.1
# via -r requirements.in
pyproject-hooks==1.0.0
pyproject-hooks==1.1.0
# via
# build
# pip-tools
pyyaml==6.0.1
# via pre-commit
sqlparse==0.4.4
sqlparse==0.5.0
# via django
tomli==2.0.1
# via
# build
# pip-tools
# pyproject-hooks
typing-extensions==4.10.0
typing-extensions==4.11.0
# via asgiref
virtualenv==20.25.1
virtualenv==20.26.2
# via pre-commit
wheel==0.43.0
# via
# -r requirements.in
# pip-tools
zipp==3.18.2
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.1.0
current_version = 5.0.0a
commit = True
tag = False

Expand Down
6 changes: 4 additions & 2 deletions src/djangocms_snippet/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from cms.utils import get_current_site
from cms.utils.permissions import get_model_permission_codename
from typing import Any, ClassVar

from django.conf import settings
from django.contrib import admin
from django.contrib.admin import helpers
Expand Down Expand Up @@ -41,9 +43,9 @@ class Media:
else "https://cdnjs.cloudflare.com/ajax/libs/ace/1.9.6/ace.js",
)

list_display = ('name',)
list_display = ("slug", "name")
search_fields: ClassVar[list[str]] = ['name']
text_area_attrs: ClassVar[dict] = {
text_area_attrs: ClassVar[dict[str, Any]] = {
'rows': 20,
'data-editor': True,
'data-mode': getattr(settings, 'DJANGOCMS_SNIPPET_THEME', 'html'),
Expand Down
5 changes: 2 additions & 3 deletions src/djangocms_snippet/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@


class SnippetConfig(AppConfig):
name = 'djangocms_snippet'
verbose_name = _('Snippets')
default_auto_field = 'django.db.models.AutoField'
name = "djangocms_snippet"
verbose_name = _("Snippets")
19 changes: 19 additions & 0 deletions src/djangocms_snippet/migrations/0010_alter_snippet_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.6 on 2023-10-25 23:30

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("djangocms_snippet", "0009_alter_snippetptr_cmsplugin_ptr"),
]

operations = [
migrations.AlterField(
model_name="snippet",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
]
1 change: 1 addition & 0 deletions src/djangocms_snippet/templatetags/snippet_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Snippet template tags
"""

from contextlib import contextmanager

from django import template
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py310-django32-cms311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
# via django-app-helper
sqlparse==0.4.4 \
--hash=sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3 \
--hash=sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c
sqlparse==0.5.0 \
--hash=sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93 \
--hash=sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663
# via django
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py310-django42-cms311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
# via django-app-helper
sqlparse==0.4.4 \
--hash=sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3 \
--hash=sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c
sqlparse==0.5.0 \
--hash=sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93 \
--hash=sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663
# via django
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
Expand Down
6 changes: 3 additions & 3 deletions tests/requirements/py311-django32-cms311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
# via django-app-helper
sqlparse==0.4.4 \
--hash=sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3 \
--hash=sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c
sqlparse==0.5.0 \
--hash=sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93 \
--hash=sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663
# via django
tox==4.11.3 \
--hash=sha256:5039f68276461fae6a9452a3b2c7295798f00a0e92edcd9a3b78ba1a73577951 \
Expand Down
Loading

0 comments on commit ba7c8ed

Please sign in to comment.