Updated shared contents properties
authorThierry Florac <thierry.florac@onf.fr>
Fri, 21 Sep 2018 09:32:00 +0200
changeset 970 7108d28758c3
parent 969 e7ad2e4d3a46
child 971 141dc5ad83d6
Updated shared contents properties
src/pyams_content/shared/imagemap/__init__.py
src/pyams_content/shared/view/__init__.py
--- a/src/pyams_content/shared/imagemap/__init__.py	Fri Sep 21 09:23:13 2018 +0200
+++ b/src/pyams_content/shared/imagemap/__init__.py	Fri Sep 21 09:32:00 2018 +0200
@@ -12,8 +12,6 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
 from persistent import Persistent
 from persistent.mapping import PersistentMapping
 from pyramid.threadlocal import get_current_registry
@@ -27,21 +25,19 @@
 from zope.traversing.interfaces import ITraversable
 
 from pyams_content import _
-# import interfaces
 from pyams_content.component.association.interfaces import IAssociationContainer
 from pyams_content.component.extfile.interfaces import IExtFileContainerTarget
 from pyams_content.component.links.interfaces import ILinkContainerTarget
-from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE, ERROR_VALUE
+from pyams_content.features.checker.interfaces import ERROR_VALUE, IContentChecker, MISSING_LANG_VALUE, MISSING_VALUE
 from pyams_content.features.preview.interfaces import IPreviewTarget
 from pyams_content.features.review.interfaces import IReviewTarget
-# import packages
-from pyams_content.shared.common import WfSharedContent, register_content_type, SharedContent, WfSharedContentChecker, \
-    IWfSharedContentFactory
-from pyams_content.shared.imagemap.interfaces import IMAGEMAP_CONTENT_TYPE, IMAGEMAP_CONTENT_NAME, \
-    IWfImageMap, IImageMap, IImageMapArea, IWfImageMapFactory
+from pyams_content.shared.common import SharedContent, WfSharedContent, WfSharedContentChecker, register_content_type
+from pyams_content.shared.common.interfaces import IWfSharedContentFactory
+from pyams_content.shared.imagemap.interfaces import IImageMap, IImageMapArea, IMAGEMAP_CONTENT_NAME, \
+    IMAGEMAP_CONTENT_TYPE, IWfImageMap, IWfImageMapFactory
 from pyams_i18n.interfaces import II18n, II18nManager
 from pyams_i18n.property import I18nFileProperty
-from pyams_utils.adapter import adapter_config, ContextAdapter
+from pyams_utils.adapter import ContextAdapter, adapter_config
 
 
 @implementer(IImageMapArea)
@@ -61,7 +57,9 @@
     content_type = IMAGEMAP_CONTENT_TYPE
     content_name = IMAGEMAP_CONTENT_NAME
 
+    handle_content_url = False
     handle_header = False
+    handle_description = False
 
     _image = I18nFileProperty(IWfImageMap['image'])
     areas = FieldProperty(IWfImageMap['areas'])
--- a/src/pyams_content/shared/view/__init__.py	Fri Sep 21 09:23:13 2018 +0200
+++ b/src/pyams_content/shared/view/__init__.py	Fri Sep 21 09:32:00 2018 +0200
@@ -12,40 +12,36 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
 import logging
 logger = logging.getLogger("PyAMS (content)")
 
 from datetime import datetime
 from itertools import tee
 
-# import interfaces
+from hypatia.catalog import CatalogQuery
 from hypatia.interfaces import ICatalog
+from hypatia.query import Any, Gt, Lt
+from pyramid.events import subscriber
+from pyramid.threadlocal import get_current_registry
+from zope.interface import implementer, provider
+from zope.intid.interfaces import IIntIds
+from zope.lifecycleevent.interfaces import IObjectModifiedEvent
+from zope.schema.fieldproperty import FieldProperty
+
+from pyams_cache.beaker import get_cache
+from pyams_catalog.query import CatalogResultSet, or_
 from pyams_content.features.preview.interfaces import IPreviewTarget
 from pyams_content.features.review.interfaces import IReviewTarget
+from pyams_content.shared.common import WfSharedContent, register_content_type, SharedContent, IWfSharedContentFactory
 from pyams_content.shared.common.interfaces.types import IWfTypedSharedContent
 from pyams_content.shared.view.interfaces import IView, IWfView, IWfViewFactory, IViewQuery, \
     IViewQueryParamsExtension, IViewQueryFilterExtension, VIEW_CONTENT_TYPE, VIEW_CONTENT_NAME, IViewSettings
+from pyams_utils.adapter import adapter_config, ContextAdapter
 from pyams_utils.interfaces import ICacheKeyValue
-from zope.intid.interfaces import IIntIds
-from zope.lifecycleevent.interfaces import IObjectModifiedEvent
-
-# import packages
-from hypatia.catalog import CatalogQuery
-from hypatia.query import Any, Gt, Lt
-from pyams_cache.beaker import get_cache
-from pyams_catalog.query import CatalogResultSet, or_
-from pyams_content.shared.common import WfSharedContent, register_content_type, SharedContent, IWfSharedContentFactory
-from pyams_utils.adapter import adapter_config, ContextAdapter
 from pyams_utils.list import unique_iter
 from pyams_utils.registry import get_utility, get_global_registry
 from pyams_utils.timezone import tztime
 from pyams_workflow.interfaces import IWorkflow
-from pyramid.events import subscriber
-from pyramid.threadlocal import get_current_registry
-from zope.interface import implementer, provider
-from zope.schema.fieldproperty import FieldProperty
 
 
 VIEWS_CACHE_REGION = 'views'
@@ -64,7 +60,9 @@
     content_type = VIEW_CONTENT_TYPE
     content_name = VIEW_CONTENT_NAME
 
+    handle_content_url = False
     handle_header = False
+    handle_description = False
 
     select_context_type = FieldProperty(IWfView['select_context_type'])
     selected_content_types = FieldProperty(IWfView['selected_content_types'])
@@ -138,6 +136,7 @@
             logger.debug("Retrieving view items from cache key {0}".format(cache_key))
         return results
 
+
 register_content_type(WfView)