Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
4245adc
Fix: Update locales and add floating options for images
fsbraun Nov 7, 2023
e66e618
Merge branch 'master' of github.com:fsbraun/djangocms-frontend
fsbraun Nov 7, 2023
cbaccdd
Merge branch 'master' of github.com:fsbraun/djangocms-frontend
fsbraun Nov 28, 2023
66e053e
fix: icons not showing in ckeditor
fsbraun Nov 28, 2023
fec0ece
Merge branch 'django-cms:master' into master
fsbraun Nov 28, 2023
49e4acc
Merge branch 'django-cms:master' into master
fsbraun Nov 28, 2023
a9ead97
Add image drag and drop
fsbraun Nov 28, 2023
9ac7126
Merge branch 'master' of github.com:fsbraun/djangocms-frontend
fsbraun Nov 28, 2023
f5f27b6
Update docs
fsbraun Nov 28, 2023
6d5fac4
Add tests
fsbraun Nov 28, 2023
18d60ab
Fix tests for v4
fsbraun Nov 28, 2023
44d5035
Bump version
fsbraun Nov 28, 2023
210cccd
Update changelog
fsbraun Nov 28, 2023
510494e
Merge branch 'django-cms:master' into master
fsbraun Nov 28, 2023
297d436
Merge branch 'django-cms:master' into master
fsbraun Dec 13, 2023
fc20a5a
Merge branch 'django-cms:master' into master
fsbraun Dec 15, 2023
606cc91
fix/remove-unused-css
fsbraun Dec 15, 2023
1af2ef9
Merge branch 'django-cms:master' into master
fsbraun Jan 4, 2024
60f810f
Merge branch 'django-cms:master' into master
fsbraun Jan 8, 2024
05a0939
Merge branch 'django-cms:master' into master
fsbraun Jan 8, 2024
a8e5f2d
Doc typos
fsbraun Jan 8, 2024
c7c8bcf
Merge branch 'django-cms:master' into master
fsbraun Jan 9, 2024
ad90c57
Fix: Missing space in auto column short description
fsbraun Jan 11, 2024
d2a2e78
Merge branch 'master' of github.com:fsbraun/djangocms-frontend
fsbraun Jan 11, 2024
41e58bc
Merge branch 'master' into master
fsbraun Jan 11, 2024
ef87c91
Unlist removed iconsets from the docs
fsbraun Jan 12, 2024
8d63c99
Merge branch 'django-cms:master' into master
fsbraun Jan 12, 2024
a165dcd
Merge branch 'master' into master
fsbraun Jan 13, 2024
c7e34a2
Merge branch 'django-cms:master' into master
fsbraun Feb 14, 2024
aa0aff9
Merge branch 'django-cms:master' into master
fsbraun Feb 16, 2024
1017581
Merge branch 'django-cms:master' into master
fsbraun Feb 28, 2024
4a6c6bf
Merge branch 'django-cms:master' into master
fsbraun Mar 21, 2024
25cbc79
Bump version
fsbraun Mar 21, 2024
a006821
Add translations
fsbraun Mar 21, 2024
47cb3d0
Update test environment
fsbraun Mar 21, 2024
17f3b71
Fix: Tree structure for pages
fsbraun Mar 21, 2024
1dd0e83
Restore Django 3.2 compatibility
fsbraun Mar 21, 2024
d405c51
Update changelog
fsbraun Mar 21, 2024
123ee85
Fix: Min width of select2 box
fsbraun Mar 21, 2024
e443877
Merge remote-tracking branch 'upstream/master'
fsbraun Mar 21, 2024
b8ba771
Fix icon picker
fsbraun Mar 21, 2024
68e9889
Prepopulate badge
fsbraun Mar 21, 2024
b6e5f34
Merge branch 'django-cms:master' into master
fsbraun Mar 21, 2024
8754e88
Merge branch 'django-cms:master' into master
fsbraun Apr 9, 2024
4151e55
Merge branch 'django-cms:master' into master
fsbraun Apr 10, 2024
fa6e98f
Merge branch 'django-cms:master' into master
fsbraun Apr 24, 2024
1d735ba
Add empty selection to internal link choices (fixes #206)
fsbraun Apr 24, 2024
1abe124
Merge branch 'django-cms:master' into master
fsbraun Apr 24, 2024
c2f8da8
Merge branch 'django-cms:master' into master
fsbraun Apr 24, 2024
0eb5feb
Fix pypi actions
fsbraun Apr 24, 2024
e993b33
Merge branch 'master' of github.com:fsbraun/djangocms-frontend
fsbraun Apr 24, 2024
6554f84
Add write permissions to pypi actions
fsbraun Apr 24, 2024
83e99f0
Add env.
fsbraun Apr 24, 2024
f3d5a93
fix: Unescape JSONView for django admin's autocomplete widget
fsbraun Apr 29, 2024
db4748a
Merge branch 'master' into fix/escape
fsbraun Apr 29, 2024
0dc9b41
Merge pull request #2 from fsbraun/fix/escape
fsbraun Apr 29, 2024
c615895
Add tests
fsbraun Apr 29, 2024
40cb02e
Merge branch 'fix/escape' of github.com:fsbraun/djangocms-frontend in…
fsbraun Apr 29, 2024
659ed56
Fix tests
fsbraun Apr 29, 2024
1b3c0cf
Merge branch 'django-cms:master' into fix/escape
fsbraun Apr 29, 2024
5918709
Merge pull request #4 from fsbraun/fix/escape
fsbraun Apr 29, 2024
3a44667
Merge branch 'django-cms:master' into master
fsbraun May 28, 2024
1c0173e
Merge branch 'django-cms:master' into master
fsbraun Oct 7, 2024
981c00c
Add support for djangocms-link 5
fsbraun Oct 27, 2024
d2b5f6e
Merge branch 'master' into feat/djangocms-link-support
fsbraun Oct 27, 2024
e18961e
Update documentation
fsbraun Oct 27, 2024
b5d6930
Test against djangocms-link PR version
fsbraun Oct 27, 2024
109e697
Add filer and easy thumbnails to test requirements
fsbraun Oct 27, 2024
0e23aba
Add package itself to the test requirements
fsbraun Oct 27, 2024
8813412
Fix: update test fixtures for v3
fsbraun Oct 27, 2024
9d0511a
Remove outdated urlconf test
fsbraun Oct 27, 2024
5a68e45
Remove unused autocomplete select2 widget
fsbraun Oct 27, 2024
526dc9d
Add warning for discontinued settings
fsbraun Oct 28, 2024
b818bcd
Merge branch 'master' into feat/djangocms-link-support
fsbraun Oct 28, 2024
462d07a
Fix `LinkPluginMixin`
fsbraun Nov 1, 2024
75d616a
Nocover for checks warnings
fsbraun Nov 1, 2024
982739e
Fix: Carousel links
fsbraun Nov 1, 2024
ff7002c
Remove component link mixin
fsbraun Nov 1, 2024
832d5f0
Add migration
fsbraun Nov 2, 2024
3793655
Fix attributes common mixin
fsbraun Nov 2, 2024
d65ed70
Refactor components
fsbraun Nov 5, 2024
f865a48
Fix: Version 3 import
fsbraun Nov 5, 2024
fdfe7f2
Update docs
fsbraun Nov 5, 2024
d572b2d
Merge branch 'master' into feat/djangocms-link-support
fsbraun Nov 5, 2024
19ce8e9
feat: pytest
fsbraun Nov 7, 2024
791f96b
add pytest dependency
fsbraun Nov 7, 2024
35a7491
fix: test for v3
fsbraun Nov 7, 2024
f76f11c
more fixes for v3 tests
fsbraun Nov 7, 2024
5f8bd34
Update project settings
fsbraun Nov 10, 2024
68d534d
Fix linting
fsbraun Nov 10, 2024
8506c2b
Add coverage config to pyproject.toml
fsbraun Nov 10, 2024
89c54a9
Add djlint options to pyproject.toml
fsbraun Nov 10, 2024
baabe0d
Fix remove isort from pre-commit
fsbraun Nov 10, 2024
ba14e2f
Fix docs
fsbraun Nov 10, 2024
cb3fc7d
Refactor components
fsbraun Nov 10, 2024
784f40f
Fix template
fsbraun Nov 11, 2024
1b19954
Merge branch 'feat/djangocms-link-support' of github.com:fsbraun/djan…
fsbraun Nov 11, 2024
711a5be
Merge branch 'master' into feat/djangocms-link-support
fsbraun Nov 19, 2024
90716ac
Update djangocms_frontend/migrations/0002_migrate_links.py
fsbraun Nov 19, 2024
4b279b7
Resolve typos from code review
fsbraun Nov 19, 2024
ff809bf
Update __init__.py
fsbraun Nov 20, 2024
02ef1b9
Update setup.py
fsbraun Nov 20, 2024
b6f1470
Update base.txt
fsbraun Nov 20, 2024
5776cd1
feat: Check for link configuration
fsbraun Nov 20, 2024
a6a2025
remove link plugin if frontend link is used
fsbraun Nov 20, 2024
4476127
fix attributes mixin
fsbraun Nov 20, 2024
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
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

7 changes: 0 additions & 7 deletions .djlint_rules.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Generate Report
- name: Intall dependencies
run: |
pip install -r tests/requirements/${{ matrix.requirements-file }}
coverage run run_tests.py
- name: Run coverage
run: |
coverage run -m pytest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v5
25 changes: 0 additions & 25 deletions .github/workflows/lint.yml

This file was deleted.

18 changes: 10 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@ repos:
rev: v3.19.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
args: ["--py39-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: "1.22.1"
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: [--target-version, "4.2"]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-pyproject
- flake8-bugbear
- flake8-builtins
- flake8-django
- flake8-length
- flake8-logging-format
- flake8-spellcheck

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.0
hooks:
- id: pyproject-fmt
8 changes: 4 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Changelog
* feat: Add float option for images by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/162
* feat: Add drag'n'drop support for djangocms-text-ckeditor by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/165
* fix: Ckeditor does not show icons for editing by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/163
* fix: Replace ``stylesSet`` setting in docs with ``customConfig` for icons in ckeditor by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/164
* fix: Replace ``stylesSet`` setting in docs with ``customConfig`` for icons in ckeditor by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/164
* ci: pre-commit autoupdate by @pre-commit-ci in https://github.com/django-cms/djangocms-frontend/pull/161


Expand All @@ -106,15 +106,15 @@ Changelog
==================

* Fix incomplete migration of code plugins from djangocms-bootstrap4
* Add compiled French locale (*.mo)
* Add compiled French locale (\*.mo)
* Add partial Dutch locale

1.1.5 (2023-07-14)
==================

* Fix bug where url for link select2 field was lost after app hook reload (#135)
* Use `bg-body` class on Bootstrap 5's tab navigation to support color modes (#138)
* Fix styling of icon buttons for better usager with plain django admin style (#141)
* Use ``bg-body`` class on Bootstrap 5's tab navigation to support color modes (#138)
* Fix styling of icon buttons for better usage with plain django admin style (#141)

1.1.4 (2023-05-28)
==================
Expand Down
67 changes: 30 additions & 37 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,33 @@

|pypi| |docs| |coverage| |python| |django| |djangocms| |djangocms4|

**django CMS Frontend** is a plugin bundle which builds on and improves
**django CMS Frontend** is a plugin bundle which originally built on and improved
the architecture of `djangocms-bootstrap4 <https://github.com/django-cms/djangocms-bootstrap4>`_.
Its objective is to provide a set of popular frontend components independent of the
currently used frontend framework such as Bootstrap, or its specific version.
Its objective is to provide a toolset to quickly create re-usable frontend
components and comes preloaded with a set of popular frontend components
independent of the currently used frontend framework such as Bootstrap, or
its specific version.

.. image:: preview.png

Key features
============

- **Easy to implement re-usable frontend custom components**, which in the
simplest case consist of a template and declarative sort of form class.

- Support of `Bootstrap 5 <https://getbootstrap.com>`_, django CMS 3.8+
and django CMS 4.
and django CMS 4 out of the box.

- **Separation of plugins from css framework**, i.e. no need to
rebuild you site's plugin tree if css framework is changed in the
future, e.g. from Bootstrap 5 to a future version.

- **New link plugin** allowing to link to internal pages provided by
other applications, such as `djangocms-blog
- Leverage of new **djangocms-link features** allowing to link to internal pages
provided by other applications, such as `djangocms-blog
<https://github.com/nephila/djangocms-blog>`_.

- **Nice and well-arranged admin frontend** of `djangocms-bootstrap4
<https://github.com/django-cms/djangocms-bootstrap4>`_
- **Nice and well-arranged admin frontend** of djangocms-bootstrap4

- **Extensible** within the project and with separate project (e.g. a
theme app). Create your own components with a few lines of code only.
Expand All @@ -35,10 +39,6 @@ Key features
(e.g. in a custom app) giving your whole project a more consistent
user experience.

- A management command to **migrate from djangocms-bootstrap4**. This
command automatically migrates all ``djangocms-bootstrap4`` plugins to
``djangocms-frontend``.


Description
===========
Expand All @@ -55,10 +55,6 @@ Instead all design parameters are stored in a common JSON field and
future releases of improved frontend features will not require to
rebuild your full plugin tree.

The link plugin has been rewritten to not only allow internal links to other
CMS pages, but also to other django models such as, e.g., posts of
`djangocms-blog <https://github.com/nephila/djangocms-blog>`_.

The plugins are designed to be re-usable as UI components in your
project, e.g. in a custom app, giving your whole project a more
consistent user experience.
Expand Down Expand Up @@ -98,8 +94,7 @@ file for additional dependencies:
- django-cms, version 3.7 or later
- django-filer, version 1.7 or later
- djangocms-attributes-field, version 1.0 or later
- djangocms-text-ckeditor, version 3.1 or later
- django-select2
- djangocms-text
- django-entangled

Make sure `django Filer
Expand All @@ -121,23 +116,22 @@ For a manual install:

'easy_thumbnails',
'djangocms_frontend',
'djangocms_frontend.contrib.accordion',
'djangocms_frontend.contrib.alert',
'djangocms_frontend.contrib.badge',
'djangocms_frontend.contrib.card',
'djangocms_frontend.contrib.carousel',
'djangocms_frontend.contrib.collapse',
'djangocms_frontend.contrib.component',
'djangocms_frontend.contrib.content',
'djangocms_frontend.contrib.grid',
'djangocms_frontend.contrib.icon',
'djangocms_frontend.contrib.image',
'djangocms_frontend.contrib.jumbotron',
'djangocms_frontend.contrib.link',
'djangocms_frontend.contrib.listgroup',
'djangocms_frontend.contrib.media',
'djangocms_frontend.contrib.tabs',
'djangocms_frontend.contrib.utilities',
'djangocms_frontend.contrib.accordion', # optional
'djangocms_frontend.contrib.alert', # optional
'djangocms_frontend.contrib.badge', # optional
'djangocms_frontend.contrib.card', # optional
'djangocms_frontend.contrib.carousel', # optional
'djangocms_frontend.contrib.collapse', # optional
'djangocms_frontend.contrib.content', # optional
'djangocms_frontend.contrib.grid', # optional
'djangocms_frontend.contrib.icon', # optional
'djangocms_frontend.contrib.image', # optional
'djangocms_frontend.contrib.jumbotron', # optional
'djangocms_frontend.contrib.link', # optional
'djangocms_frontend.contrib.listgroup', # optional
'djangocms_frontend.contrib.media', # optional
'djangocms_frontend.contrib.tabs', # optional
'djangocms_frontend.contrib.utilities', # optional

- run ``python manage.py migrate``

Expand All @@ -153,8 +147,7 @@ install separately or by adding an option:
Documentation
=============

See readthedocs for the `documentation
<https://djangocms-frontend.readthedocs.io>`_.
See readthedocs for the `documentation <https://djangocms-frontend.readthedocs.io>`_.

License
=======
Expand Down
16 changes: 8 additions & 8 deletions run_tests.py → conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
from django.test.utils import get_runner


def run(argv=None):
if argv is None:
argv = ["tests"]
tests = argv[1:] if len(argv) > 1 else ["tests"]
def pytest_configure():
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.test_settings"
django.setup()


if __name__ == "__main__":
pytest_configure()

argv = ["tests"] if sys.argv is None else sys.argv
tests = argv[1:] if len(argv) > 1 else ["tests"]
TestRunner = get_runner(settings)
test_runner = TestRunner()
failures = test_runner.run_tests(tests)
sys.exit(bool(failures))


if __name__ == "__main__":
run(sys.argv)
2 changes: 1 addition & 1 deletion djangocms_frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
13. Github actions will publish the new package to pypi
"""

__version__ = "2.0.0a"
__version__ = "2.0.0a1"
63 changes: 60 additions & 3 deletions djangocms_frontend/apps.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,68 @@
from django import apps
from django.core import checks


class DjangocmsFrontendConfig(apps.AppConfig):
name = "djangocms_frontend"
verbose_name = "DjangoCMS Frontend"
verbose_name = "django CMS Frontend"

def ready(self):
from .component_pool import setup
from . import plugin_tag

setup()
plugin_tag.setup()
checks.register(check_settings)
checks.register(check_installed_apps)


def check_settings(*args, **kwargs): # pragma: no cover
from django.conf import settings

warnings = []

if hasattr(settings, "DJANGOCMS_FRONTEND_MINIMUM_INPUT_LENGTH"):
warnings.append(
checks.Warning(
"The DJANGOCMS_FRONTEND_MINIMUM_INPUT_LENGTH setting was removed in djangocms-frontend 2.",
"Use DJANGOCMS_LINK_MINIMUM_INPUT_LENGTH instead.",
id="djangocms_frontend.W001",
obj="settings.DJANGOCMS_FRONTEND_MINIMUM_INPUT_LENGTH",
)
)
if hasattr(settings, "DJANGOCMS_FRONTEND_LINK_MODELS"):
warnings.append(
checks.Warning(
"The DJANGOCMS_FRONTEND_LINK_MODELS setting was removed in djangocms-frontend 2. "
"djangocms-frontend 2 uses linkable models from djangocms-link. See "
"https://github.com/django-cms/djangocms-link#django-cms-link for more info.",
"This message disappears after removing the DJANGOCMS_FRONTEND_LINK_MODELS from your "
"project's settings.\n",
id="djangocms_frontend.W002",
obj="settings.DJANGOCMS_FRONTEND_LINK_MODELS",
)
)
return warnings


def check_installed_apps(*args, **kwargs): # pragma: no cover
from django.conf import settings

errors = []
link_contrib_apps = [
"djangocms_frontend.contrib.carousel",
"djangocms_frontend.contrib.image",
"djangocms_frontend.contrib.link",
]
link_apps_used = [app for app in link_contrib_apps if app in settings.INSTALLED_APPS]
if link_apps_used:
if "djangocms_link" not in settings.INSTALLED_APPS:
errors.append(
checks.Error(
"djangocms-frontend requires djangocms-link to be installed for {}.".format(
", ".join(link_apps_used)
),
"Add 'djangocms_link' to your INSTALLED_APPS setting or remove all of the above apps.",
id="djangocms_frontend.E001",
obj="settings.INSTALLED_APPS",
)
)
return errors
Loading