Skip to content

Commit

Permalink
Fix: ensure force_text on plugins' __str__()
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Feb 22, 2022
1 parent a7c2a6f commit 822edbf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions djangocms_frontend/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from cms.plugin_base import CMSPluginBase
from django.utils.encoding import force_text


class CMSUIPlugin(CMSPluginBase):
render_template = "djangocms_frontend/html_container.html"
change_form_template = "djangocms_frontend/admin/base.html"

def __str__(self):
return force_text(super().__str__())
24 changes: 24 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,30 @@ course - view instances of all djangocms_frontend UI items:
Otherwise the plugins will not be editable and will not appear in the editors'
plugin selection when adding a plugin in the frontend.

Since changing them for each of the plugins manually can become tiresome a
management command can support you.

**First** manually define the permissions for the model ``FrontendUIItem`` of
the app ``djangocms_frontend``. **Then** you can synchronize
all permissions of the installed UI items by typing

.. code-block::
./manage.py frontend sync_permissions users
./manage.py frontend sync_permissions groups
These commands transfer the permissions for ``FrontendUIItem`` to all installed
plugins for each user or group, respectively.

The first command is only necessary of you define by-user permissions. Depending
on the number of users it may take some time.



.. attention::

If in doubt, please make a backup of your database tables. This operation
cannot be undone!

.. index::
single: Migration from Bootstrap 4
Expand Down

0 comments on commit 822edbf

Please sign in to comment.