Skip to content

Commit 8739710

Browse files
committed
Merge pull request django-cms#3363 from sthzg/patch-2
Updated docs
2 parents 12a275e + b9ae56f commit 8739710

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/extending_cms/custom_plugins.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,14 @@ clause.
268268
field, as it is declared as a property of :class:`cms.models.pluginmodel.CMSPlugin`,
269269
and your plugin will not work as intended in the administration without
270270
further work.
271+
272+
.. warning::
273+
274+
If you are using Python 2.x and overriding the ``__unicode__`` method of the
275+
model file, make sure to return its results as UTF8-string. Otherwise
276+
saving an instance of your plugin might fail with the frontend editor showing
277+
an <Empty> plugin instance. To return in unicode use a return statement like
278+
``return u'{}'.format(self.guest_name)``.
271279

272280
.. _handling-relations:
273281

0 commit comments

Comments
 (0)