Skip to content

Commit cd273db

Browse files
docs: Update documentation (#259)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 5a2989c commit cd273db

Some content is hidden

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

49 files changed

+719
-638
lines changed

README.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,60 @@
44

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

7-
**django CMS Frontend** is a powerful plugin suite designed to streamline the
8-
integration of frontend frameworks into django CMS. Out of the box, it provides
9-
comprehensive support for Bootstrap 5, while also enabling the use of other
10-
CSS frameworks, such as Tailwind CSS, through custom components.
11-
Whether you're building responsive layouts or highly customized designs,
12-
django CMS Frontend is designed to simplify your development workflow.
7+
django CMS Frontend is a versatile plugin suite for django CMS that facilitates
8+
the easy creation of reusable frontend components. It supports any CSS framework,
9+
allowing developers to seamlessly integrate their preferred styling libraries.
10+
For immediate use, it includes a comprehensive set of Bootstrap 5 components
11+
and templates.
12+
1313

1414
.. image:: preview.png
1515

1616
Key features
1717
============
1818

19-
- **Easy to implement re-usable frontend custom components**, which in the
20-
simplest case consist of a template and declarative sort of form class.
21-
22-
- Support of `Bootstrap 5 <https://getbootstrap.com>`_, django CMS 3.8+
23-
and django CMS 4 out of the box.
19+
* **Effortless Development of Custom Components**: Create reusable frontend
20+
components with ease, utilizing simple templates and declarative form
21+
classes. These components can function both as CMS plugins and within
22+
standard Django templates. ​
2423

25-
- Support of other frameworks such as `Tailwind CSS <https://tailwindcss.com>`_
26-
through custom components.
24+
* **Framework-Agnostic Design**: Maintain flexibility in your project's design
25+
by decoupling plugins from specific versions of a CSS framework. This ensures
26+
that updating frameworks in the future doesn't necessitate rebuilding your
27+
site's plugin structure. ​
2728

28-
- **Separation of plugins from css framework**, i.e. no need to
29-
rebuild you site's plugin tree if css framework is changed in the
30-
future, e.g. from Bootstrap 5 to a future version.
29+
* **Pre-Integrated Bootstrap 5 Components**: Access a ready-to-use collection
30+
of Bootstrap 5 components, streamlining the process of building responsive
31+
and modern interfaces. ​
3132

32-
- **Plugins are re-usable as UI components** anywhere in your project
33-
(e.g. in a custom app) giving your whole project a more consistent
34-
user experience.
35-
36-
- **Extensible** within the project and with separate project (e.g. a
37-
theme app). Create your own components with a few lines of code only.
33+
* **Extensibility**: Enhance your project by creating custom components with
34+
minimal code. The system is designed to be extended both within individual
35+
projects and through separate theme applications. ​
3836

37+
* **Consistent User Experience**: Utilize plugins as UI components throughout
38+
your project, promoting a cohesive and uniform user interface. ​
3939

4040

4141
Description
4242
===========
43-
django CMS Frontend is framework agnostic but comes with support of selected
44-
components of Bootstrap 5. Components can have different templates for different
45-
frameworks and the preferred framework can be set in the project settings.
4643

47-
It is up to you which (if any at all) components you want to include in your
48-
project. Each set of components is a separate package you can include in your
49-
project's ``INSTALLED_APPS``.
44+
Designed to be framework-agnostic, django CMS Frontend allows developers to
45+
select and change CSS frameworks by adjusting project settings, eliminating
46+
the need to reconstruct the CMS plugin tree when upgrading or switching
47+
frameworks. It leverages `django-entangled
48+
<https://github.com/jrief/django-entangled>`_ to store design parameters in
49+
a common JSON field, preventing database bloat and facilitating seamless
50+
updates to frontend features.
5051

51-
The components are designed to be re-usable as UI components in your
52-
project, e.g. in a custom app, giving your whole project a more
53-
consistent user experience.
52+
By providing a suite of Bootstrap 5-based components for layout structuring,
53+
including grids, components, and forms, django CMS Frontend simplifies the
54+
process of building responsive and structured page designs. Developers can
55+
also create custom components with minimal code, ensuring a consistent and
56+
efficient development experience.
5457

55-
django CMS Frontend uses `django-entangled
56-
<https://github.com/jrief/django-entangled>`_ by Jacob Rief to avoid
57-
bloating your project's database with css framework-dependent tables.
58-
Instead all design parameters are stored in a common JSON field and
59-
future releases of improved frontend features will not require to
60-
rebuild your full plugin tree.
58+
It is up to you which (if any at all) pre-built components you want to include
59+
in your project. Each set of components is a separate package you can include
60+
in your project's ``INSTALLED_APPS``.
6161

6262

6363
Contributing
@@ -116,6 +116,7 @@ For a manual install:
116116
.. code::
117117
118118
'easy_thumbnails',
119+
'djangocms_link', # Needed for link support
119120
'djangocms_frontend',
120121
'djangocms_frontend.contrib.accordion', # optional
121122
'djangocms_frontend.contrib.alert', # optional
@@ -144,7 +145,6 @@ install separately or by adding an option:
144145
pip install djangocms-frontend[djangocms-icon] # Installs djangocms-icon for icon support in links
145146
146147
147-
148148
Documentation
149149
=============
150150

@@ -174,5 +174,5 @@ See `LICENSE <https://github.com/django-cms/djangocms-frontend/blob/master/LICEN
174174
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.8%2B-blue.svg
175175
:target: https://www.django-cms.org/
176176

177-
.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4-blue.svg
177+
.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4%2B-blue.svg
178178
:target: https://www.django-cms.org/en/preview-django-cms-40/

djangocms_frontend/component_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CMSFrontendComponent(forms.Form):
5050
_admin_form = None
5151
_model = None
5252
_plugin = None
53-
META_FIELDS = ["is_local", "disable_edit", "disable_child_plugins", "show_plugin_add_form",
53+
META_FIELDS = ["is_local", "disable_edit", "disable_child_plugins", "show_add_form",
5454
"frontend_editable_fields", "link_fieldset_position", "require_parent",
5555
"parent_classes"]
5656

djangocms_frontend/contrib/accordion/cms_plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class AccordionItemPlugin(mixin_factory("AccordionItem"), CMSUIPlugin):
7373
model = models.AccordionItem
7474
form = forms.AccordionItemForm
7575
allow_children = True
76-
show_plugin_add_form = False
76+
show_add_form = False
7777

7878
parent_classes = [
7979
"AccordionPlugin",

djangocms_frontend/contrib/content/cms_plugins.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class BlockquotePlugin(
6363
form = forms.BlockquoteForm
6464
change_form_template = "djangocms_frontend/admin/blockquote.html"
6565
allow_children = True
66+
frontend_editable_fields = ("quote_content", "quote_origin")
6667

6768
fieldsets = [
6869
(
@@ -77,8 +78,6 @@ class BlockquotePlugin(
7778
),
7879
]
7980

80-
frontend_editable_fields = ("quote_content", "quote_origin")
81-
8281

8382
@plugin_pool.register_plugin
8483
class FigurePlugin(
@@ -100,6 +99,7 @@ class FigurePlugin(
10099
form = forms.FigureForm
101100
change_form_template = "djangocms_frontend/admin/figure.html"
102101
allow_children = True
102+
frontend_editable_fields = ("figure_caption",)
103103

104104
fieldsets = [
105105
(
@@ -112,5 +112,3 @@ class FigurePlugin(
112112
},
113113
),
114114
]
115-
116-
frontend_editable_fields = ("figure_caption",)

djangocms_frontend/contrib/grid/cms_plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class GridContainerPlugin(
3535
form = forms.GridContainerForm
3636
change_form_template = "djangocms_frontend/admin/grid_container.html"
3737
allow_children = True
38-
show_plugin_add_form = False
38+
show_add_form = False
3939

4040
fieldsets = [
4141
(
@@ -153,7 +153,7 @@ class GridColumnPlugin(
153153
# TODO it should allow for the responsive utility class
154154
# https://getbootstrap.com/docs/5.0/layout/grid/#column-resets
155155
parent_classes = ["GridRowPlugin"]
156-
show_plugin_add_form = False
156+
show_add_form = False
157157

158158
fieldsets = [
159159
(

djangocms_frontend/contrib/link/migrations/0002_rename_plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class Migration(migrations.Migration):
1414
('link', '0001_initial'),
1515
]
1616

17-
1817
operations = [
1918
migrations.RunPython(
2019
lambda apps, schema_editor: rename(apps, "Link", "TextLink"),

djangocms_frontend/contrib/listgroup/cms_plugins.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class ListGroupPlugin(
2929
form = forms.ListGroupForm
3030
change_form_template = "djangocms_frontend/admin/list-group.html"
3131
allow_children = True
32-
child_classes = ["ListGroupItemPlugin", "LinkPlugin"]
32+
child_classes = ["ListGroupItemPlugin", "TextLinkPlugin"]
33+
show_add_form = False
3334
# TODO consider linking to tab-content
3435

3536
fieldsets = [
@@ -57,6 +58,7 @@ class ListGroupItemPlugin(
5758
change_form_template = "djangocms_frontend/admin/list-group.html"
5859
allow_children = True
5960
parent_classes = ["ListGroupPlugin"]
61+
frontend_editable_fields = ("simple_content",)
6062

6163
fieldsets = [
6264
(

djangocms_frontend/contrib/media/cms_plugins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class MediaPlugin(mixin_factory("Media"), AttributesMixin, ResponsiveMixin, CMSU
2323
form = forms.MediaForm
2424
change_form_template = "djangocms_frontend/admin/media.html"
2525
allow_children = True
26+
show_add_form = False
2627

2728
fieldsets = settings.EMPTY_FIELDSET
2829

@@ -41,5 +42,6 @@ class MediaBodyPlugin(mixin_factory("MediaBody"), AttributesMixin, CMSUIPlugin):
4142
change_form_template = "djangocms_frontend/admin/media.html"
4243
allow_children = True
4344
parent_classes = ["MediaPlugin"]
45+
show_add_form = False
4446

4547
fieldsets = settings.EMPTY_FIELDSET

djangocms_frontend/contrib/navigation/cms_plugins.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class PageTreePlugin(
8282
parent_classes = [
8383
"NavigationPlugin",
8484
]
85+
show_add_form = False
8586
fieldsets = [
8687
(
8788
None,

djangocms_frontend/contrib/tabs/cms_plugins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class TabPlugin(mixin_factory("Tab"), AttributesMixin, CMSUIPlugin):
2727
change_form_template = "djangocms_frontend/admin/tabs.html"
2828
allow_children = True
2929
child_classes = ["TabItemPlugin"]
30+
show_add_form = False
3031

3132
fieldsets = [
3233
(
@@ -59,6 +60,7 @@ class TabItemPlugin(mixin_factory("TabItem"), AttributesMixin, PaddingMixin, CMS
5960
change_form_template = "djangocms_frontend/admin/tabs.html"
6061
allow_children = True
6162
parent_classes = ["TabPlugin"]
63+
show_add_form = False
6264

6365
fieldsets = [
6466
(

0 commit comments

Comments
 (0)