Skip to content
Snippets Groups Projects
Commit 35905c27 authored by Dylann Cordel's avatar Dylann Cordel :crossed_swords:
Browse files

fix setting

parent 6ddc6c9c
No related branches found
No related tags found
No related merge requests found
......@@ -8,16 +8,6 @@ Each item is a related instance of whatever model you allow. You can have a high
item which is a `News` instance, then a item which is a `Page` instance, then a item which is a
`MagicPony` instance etc.
HighlightedContent is built with WAI consideration and use recommendations you can find on the w3c:
https://www.w3.org/WAI/tutorials/highlighted_contents/
Javascript part is done with [tinyhighlighted_content](https://github.com/wieringen/tinyhighlighted_content), a light
jQuery module, with some custom improvment:
* when hovering the highlighted_content, it is stopped, and restarted when your mouse leaves the area
* axis of the highlighted_content (x / y) is changed when your highlighted_content area width is bellow the breakpoint
you defined
## How to use it
......@@ -34,7 +24,7 @@ INSTALLED_APPS = [
'highlighted_content',
]
CMS_CAROUSEL_SLIDES_MODELS = (
CMS_HIGHLIGHTED_CONTENT_ITEMS_MODELS = (
# format: ('app_name', ('SomeModel', 'AnOther', )),
('news', ('News', ),),
('fosm', ('Chronicle', 'Note', 'Dossier', 'Conference')),
......@@ -78,7 +68,7 @@ plugin_pool.register_plugin(HighlightedContentPlugin)
### 4. Templates
Slides can be from multiple models (configured in `CMS_CAROUSEL_SLIDES_MODELS`). You must create
Slides can be from multiple models (configured in `CMS_HIGHLIGHTED_CONTENT_ITEMS_MODELS`). You must create
at least a general template (`highlighted_content/highlighted_content_item.html`) which can manage all available
models.
......
......@@ -44,7 +44,7 @@ class HighlightedContentItemForm(ModelForm):
def get_content_types_queryset(self):
items_models = getattr(self, 'highlighted_content_items_models',
settings.CMS_CAROUSEL_SLIDES_MODELS)
settings.CMS_HIGHLIGHTED_CONTENT_ITEMS_MODELS)
q = Q()
if items_models:
for app, models in items_models:
......
......@@ -10,6 +10,7 @@ from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin
from cms.models.fields import PageField
###################################################################################################
......@@ -27,7 +28,6 @@ class HighlightedContentPluginBase(CMSPlugin):
null=True, blank=True,
help_text=_('Page displaying all elements'))
def __str__(self):
if self.title:
return '%s "%s"' % (self._meta.verbose_name, self.title)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment