Skip to content

Commit ecd27af

Browse files
fsbraunsourcery-ai[bot]pre-commit-ci[bot]
authored
feat: (Re-) Introduce static aliases in the structure board (#283)
* chore: Refactor for djangocms-versioning 2.4 * feat: Re-introduce placeholders for static aliases in structure board * fix: tests * tests: update requirement files * Update djangocms_alias/rendering.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * tests: Update requirements * chore: Code improvement * tests: Add test for static alias in structure board * chore: Collect project meta information in pyproject.toml * ci: auto fixes from pre-commit hooks for more information, see https://pre-commit.ci * fix: tox.ini * tests: Update environment - switch to pytest * fix: remove unnecessary distutil dependency * fix: tox.ini * fix: Remove tests against django main from required tests * fix: Add default_auto_field, update migration to atomic transaction * Update locales * Update German locale * fix: Cache template rendering results * fix: Deactivate static alias caching in dev mode * perf: DB optimization of template tag * perf: Save prefetch query --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 66ee5c0 commit ecd27af

File tree

84 files changed

+1129
-3657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1129
-3657
lines changed

.editorconfig

Lines changed: 0 additions & 31 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 216 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
strategy:
1616
matrix:
1717
python-version:
18-
- 3.9
1918
- '3.10'
2019
- '3.11'
2120
- '3.12'
@@ -80,7 +79,7 @@ jobs:
8079
name: html-report
8180
path: htmlcov
8281

83-
unit-tests-django-main:
82+
unit-tests-dev:
8483
runs-on: ${{ matrix.os }}
8584
strategy:
8685
fail-fast: false
@@ -108,5 +107,5 @@ jobs:
108107
python -m pip install -e .
109108
110109
- name: Run coverage
111-
run: coverage run ./test_settings.py
110+
run: coverage run -m pytest
112111
continue-on-error: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ htmlcov
1414
.python-version
1515
venv*
1616
node_modules
17+
.editorconfig

README.rst

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,32 @@
44
django CMS Alias
55
****************
66

7-
|coverage| |python| |django| |djangocms4|
7+
|PyPiVersion| |Coverage| |DjVersion| |CmsVersion|
88

9-
django CMS Alias replicates and extends the alias function of django CMS version 3 for django CMS version 4.
9+
django CMS Alias replicates and extends the alias function of django CMS version 3 for
10+
django CMS version 4 and later.
1011

11-
An alias is a collection of plugins that is managed centrally. A reference can be added to any placeholder using the Alias plugin. Since the Alias plugin creates a reference any changes to the alias are immediately reflected at all places it is used.
12+
An alias is a collection of plugins that is managed centrally. A reference can be added to
13+
any placeholder using the Alias plugin. Since the Alias plugin creates a reference any changes
14+
to the alias are immediately reflected at all places it is used.
15+
16+
Aliases are created and edited independently of their usage through their own dedicated editing
17+
endpoints, i.e. outside of django CMS pages. This allows content managers to maintain alias
18+
content without needing to navigate to a page where the alias is used.
19+
20+
When editing a page that contains static aliases, these aliases are shown in the structure board,
21+
providing visibility into the alias' content while maintaining the separation between alias management
22+
and page editing. If the static alias can be changed, it is fully accessible through the structure board.
23+
24+
Static aliases cannot be changed in the structure board on views that have no editing interface.
1225

1326
django CMS Alias supports versioning aliases by django CMS Versioning.
1427

1528
.. warning::
1629

17-
This is the development branch for django CMS version 4.1 support.
30+
django CMS Alias 3 and later require django CMS 5.0 or later.
1831

19-
For django CMS V4.0 support, see `support/django-cms-4.0.x branch <https://github.com/django-cms/djangocms-alias/tree/support/django-cms-4.0.x>`_
32+
Use ``djangocms-alias>=2,<3`` for django CMS 4.1.
2033

2134

2235
============
@@ -34,7 +47,7 @@ To install
3447

3548
Run::
3649

37-
pip install git+https://github.com/django-cms/djangocms-alias@master#egg=djangocms-alias
50+
pip install djangocms-alias
3851

3952
Add ``djangocms_alias`` and ``parler`` to your project's ``INSTALLED_APPS``.
4053

@@ -65,20 +78,27 @@ Example::
6578
Alias plugin
6679
============
6780

68-
Alternatively, aliases can be used with the Alias plugin. It allows to select which alias content is shown at the exact position the alias plugin is placed.
81+
Alternatively, aliases can be used with the Alias plugin. It allows to select which alias content is shown at the
82+
exact position the alias plugin is placed.
6983

70-
.. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-alias/branch/master/graph/badge.svg
71-
:target: https://codecov.io/gh/django-cms/djangocms-alias
84+
Side notes
85+
==========
86+
For the plugin to work out of the box ``{% block content %}`` is expected to exist in your main ``base.html`` file.
7287

73-
.. |python| image:: https://img.shields.io/badge/python-3.9+-blue.svg
74-
:target: https://pypi.org/project/djangocms-alias/
88+
.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-alias.svg?style=flat-square
89+
:target: https://pypi.python.org/pypi/djangocms-alias
90+
:alt: Latest PyPI version
91+
.. |Coverage| image:: https://codecov.io/gh/django-cms/djangocms-alias/graph/badge.svg?token=UUkVjsHGcA
92+
:target: https://codecov.io/gh/django-cms/djangocms-alias
7593

76-
.. |django| image:: https://img.shields.io/badge/django-4.2+-blue.svg
77-
:target: https://www.djangoproject.com/
94+
.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-alias.svg?style=flat-square
95+
:target: https://pypi.python.org/pypi/djangocms-alias
96+
:alt: Python versions
7897

79-
.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4+-blue.svg
80-
:target: https://www.django-cms.org/
98+
.. |DjVersion| image:: https://img.shields.io/pypi/frameworkversions/django/djangocms-alias.svg?style=flat-square
99+
:target: https://pypi.python.org/pypi/djangocms-alias
100+
:alt: Django versions
81101

82-
Side notes
83-
============
84-
For the plugin to work out of the box ``{% block content %}`` is expected to exist in your main ``base.html`` file.
102+
.. |CmsVersion| image:: https://img.shields.io/pypi/frameworkversions/django-cms/djangocms-alias.svg?style=flat-square
103+
:target: https://pypi.python.org/pypi/djangocms-alias
104+
:alt: django CMS versions

djangocms_alias/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
A reference can be added to any placeholder using the Alias plugin.
44
"""
55

6-
__version__ = "2.0.5"
6+
__version__ = "3.0.0"

0 commit comments

Comments
 (0)