mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-10 22:03:09 +00:00
rename admin theme integration plugin for rich text, fixes in rich text plugin
This commit is contained in:
parent
695755b666
commit
c166b720b3
5 changed files with 16 additions and 13 deletions
|
|
@ -38,6 +38,11 @@ class ContentRichTextPlugin(FormElementPlugin):
|
|||
)
|
||||
)
|
||||
|
||||
def get_rendered_text(self):
|
||||
"""Get rendered text."""
|
||||
rendered_text = "<div>{0}</div>".format(smart_str(self.data.text))
|
||||
return rendered_text
|
||||
|
||||
def get_form_field_instances(self,
|
||||
request=None,
|
||||
form_entry=None,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
=========================================================================================================================
|
||||
fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_djangocms_admin_style_theme_widget
|
||||
=========================================================================================================================
|
||||
=========================================================================================================
|
||||
fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_admin_style_widget
|
||||
=========================================================================================================
|
||||
A rich-text widget to the ``content_richtext`` plugin (for Simple theme).
|
||||
|
||||
Installation
|
||||
============
|
||||
1. Add ``fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_djangocms_admin_style_theme_widget``
|
||||
1. Add ``fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_admin_style_widget``
|
||||
to the ``INSTALLED_APPS`` in your ``settings.py``.
|
||||
|
||||
.. code-block:: python
|
||||
|
|
@ -13,7 +13,7 @@ Installation
|
|||
INSTALLED_APPS = (
|
||||
# ...
|
||||
'fobi.contrib.themes.djangocms_admin_style_theme',
|
||||
'fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_djangocms_admin_style_theme_widget',
|
||||
'fobi.contrib.themes.djangocms_admin_style_theme.widgets.form_elements.content_richtext_admin_style_widget',
|
||||
'fobi.contrib.plugins.form_elements.content.content_richtext',
|
||||
# ...
|
||||
)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
__title__ = 'fobi.contrib.themes.djangocms_admin_style_theme.widgets.' \
|
||||
'form_elements.content_richtext_djangocms_admin_style_theme_widget'
|
||||
'form_elements.content_richtext_admin_style_widget'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2017 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
|
|
@ -7,5 +7,5 @@ __all__ = ('default_app_config',)
|
|||
|
||||
default_app_config = 'fobi.contrib.themes.djangocms_admin_style_theme.' \
|
||||
'widgets.form_elements.' \
|
||||
'content_richtext_djangocms_admin_style_theme_widget.' \
|
||||
'content_richtext_admin_style_widget.' \
|
||||
'apps.Config'
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
__title__ = 'fobi.contrib.themes.djangocms_admin_style_theme.widgets.' \
|
||||
'form_elements.' \
|
||||
'content_richtext_djangocms_admin_style_theme_widget.apps'
|
||||
'content_richtext_admin_style_widget.apps'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2017 Artur Barseghyan'
|
||||
__license__ = 'GPL 2.0/LGPL 2.1'
|
||||
|
|
@ -14,10 +14,9 @@ try:
|
|||
|
||||
name = 'fobi.contrib.themes.djangocms_admin_style_theme.widgets.' \
|
||||
'form_elements.' \
|
||||
'content_richtext_djangocms_admin_style_theme_widget'
|
||||
'content_richtext_admin_style_widget'
|
||||
label = 'fobi_contrib_themes_djangocms_admin_style_theme_widgets_' \
|
||||
'form_elements_content_richtext_djangocms_admin_style_theme_' \
|
||||
'widget'
|
||||
'form_elements_content_richtext_admin_style_widget'
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
@ -6,8 +6,7 @@ from fobi.contrib.plugins.form_elements.content.content_richtext.widgets \
|
|||
from fobi.contrib.themes.simple import UID
|
||||
|
||||
__title__ = 'fobi.contrib.themes.djangocms_admin_style_theme.widgets.' \
|
||||
'form_elements.' \
|
||||
'content_richtext_djangocms_admin_style_theme_widget.' \
|
||||
'form_elements.content_richtext_admin_style_widget.' \
|
||||
'fobi_form_elements'
|
||||
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
|
||||
__copyright__ = '2014-2017 Artur Barseghyan'
|
||||
Loading…
Reference in a new issue