+ +
+

pyams_portal package

+ +
+

Submodules

+
+
+

pyams_portal.include module

+
+
+pyams_portal.include.include_package(config)
+

Pyramid include

+
+ +
+
+

pyams_portal.page module

+
+
+pyams_portal.page.PortalContextPageAdapter(context)
+

Portal context page factory

+
+ +
+
+class pyams_portal.page.PortalContextPortletTraverser(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

++portlet++ portal context traverser

+
+
+traverse(name, thurtherpath=None)
+
+ +
+ +
+
+pyams_portal.page.PortalContextPortletsConfigurationAdapter(context)
+

Portal context portlets configuration adapter

+
+ +
+
+pyams_portal.page.PortalContextTemplateConfigurationAdapter(context)
+

Portal context template configuration adapter

+
+ +
+
+class pyams_portal.page.PortalContextTemplateTraverser(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

++template++ portal context traverser

+
+
+traverse(name, furtherpath=None)
+
+ +
+ +
+
+class pyams_portal.page.PortalPage
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portal page persistent class

+

The page is the highest configuration level. +It defines which template is used (a shared or local one), which gives +the slot and portlet lists.

+
+
+can_inherit
+
+ +
+
+inherit_parent
+
+ +
+
+local_template
+
+ +
+
+parent
+
+ +
+
+shared_template
+
+ +
+
+template
+
+ +
+
+use_local_template
+
+ +
+
+use_shared_template
+
+ +
+ +
+
+

pyams_portal.portlet module

+
+
+class pyams_portal.portlet.PortalPortletsConfiguration(*args, **kwargs)
+

Bases: persistent.mapping.PersistentMapping, zope.container.contained.Contained

+

Portal portlets configuration

+
+
+classmethod clone(source_config, new_parent)
+

Clone source configuration

+
+ +
+
+delete_portlet_configuration(portlet_id)
+
+ +
+
+get_portlet_configuration(portlet_id)
+
+ +
+
+set_portlet_configuration(portlet_id, config)
+
+ +
+ +
+
+class pyams_portal.portlet.Portlet
+

Bases: object

+

Base portlet utility

+
+
+permission
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+settings_class = None
+
+ +
+
+toolbar_css_class = 'fa fa-fw fa-2x fa-edit'
+
+ +
+
+toolbar_image = None
+
+ +
+ +
+
+class pyams_portal.portlet.PortletConfiguration(portlet)
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portlet configuration persistent class

+

This class is a generic persistent class which is used to store all portlet +configuration and is not supposed to be sub-classed.

+

PortletConfiguration.__parent__ points to context where configuration is applied (each context or +local template). +PortletConfiguration.parent points to context from where configuration is inherited.

+
+
+can_inherit
+
+ +
+
+editor_settings
+
+ +
+
+inherit_parent
+
+ +
+
+parent
+
+ +
+
+portlet_id
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+portlet_name = None
+
+ +
+
+settings
+
+ +
+ +
+
+pyams_portal.portlet.PortletConfigurationAdapter(portlet)
+

Portlet configuration factory

+
+ +
+
+class pyams_portal.portlet.PortletConfigurationPermissionChecker(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

Portlet configuration permission checker

+
+
+edit_permission
+
+ +
+ +
+
+pyams_portal.portlet.PortletConfigurationSettingsAdapter(configuration)
+

Portlet configuration settings adapter

+
+ +
+
+class pyams_portal.portlet.PortletConfigurationSettingsTraverser(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

++settings++ portlet configuration traverser

+
+
+traverse(name, furtherpath=None)
+
+ +
+ +
+
+class pyams_portal.portlet.PortletContentProvider(context, request, view, settings)
+

Bases: pyams_viewlet.viewlet.ViewContentProvider

+

Base portlet content provider

+
+ +
+
+class pyams_portal.portlet.PortletPreviewer(context, request, view, settings)
+

Bases: pyams_portal.portlet.PortletContentProvider

+

Portlet previewer adapter

+
+
+slot_configuration
+
+ +
+ +
+
+class pyams_portal.portlet.PortletRenderer(context, request, view, settings)
+

Bases: pyams_portal.portlet.PortletContentProvider

+

Portlet renderer adapter

+
+
+slot_configuration
+
+ +
+
+target_interface = None
+
+ +
+ +
+
+class pyams_portal.portlet.PortletRenderersVocabulary(context)
+

Bases: zope.schema.vocabulary.SimpleVocabulary

+

Portlet renderers vocabulary

+
+ +
+
+class pyams_portal.portlet.PortletSettings(configuration)
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portlet settings persistent class

+

This class is supposed to be sub-classed by all custom portlet subclasses to +store their configuration settings. +Each portlet sub-class must define it’s settings class in it’s “settings_class” attribute.

+
+
+configuration
+
+ +
+
+renderer
+
+ +
+
+visible
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+class pyams_portal.portlet.PortletVocabulary(context)
+

Bases: zope.schema.vocabulary.SimpleVocabulary

+

Portlet vocabulary

+
+ +
+
+class pyams_portal.portlet.portlet_config(**settings)
+

Bases: object

+

Class decorator used to declare a portlet

+
+
+venusian = <module 'venusian' from '/var/local/env/pycharm/lib/python3.5/site-packages/venusian/__init__.py'>
+
+ +
+ +
+
+

pyams_portal.site module

+
+
+class pyams_portal.site.PortalGenerationsChecker
+

Bases: object

+

Portal generations checker

+
+
+evolve(site, current=None)
+

Check for required utilities

+
+ +
+
+generation = 1
+
+ +
+ +
+
+pyams_portal.site.handle_new_local_site(event)
+

Create a new templates container when a site is created

+
+ +
+
+

pyams_portal.slot module

+
+
+class pyams_portal.slot.SlotConfiguration(slot_name, **kwargs)
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portal slot class

+
+
+css_class
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+get_css_class(device=None)
+
+ +
+
+get_width(device=None)
+
+ +
+
+lg_width
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+md_width
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+portlet_ids
+
+ +
+
+set_width(width, device=None)
+
+ +
+
+slot_name
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+sm_width
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+template
+
+ +
+
+visible
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+xs_width
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+

pyams_portal.template module

+
+
+class pyams_portal.template.PortalTemplate
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portal template class

+
+
+name
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+class pyams_portal.template.PortalTemplateConfiguration
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portal template configuration

+
+
+add_portlet(portlet_name, slot_name)
+

Add portlet to given slot

+
+ +
+
+add_row()
+

Add new row and return last row index (0 based)

+
+ +
+
+add_slot(slot_name, row_id=None)
+
+ +
+
+delete_portlet(portlet_id)
+

Delete portlet

+
+ +
+
+delete_row(row_id)
+

Delete template row

+
+ +
+
+delete_slot(slot_name)
+

Delete slot and associated portlets

+
+ +
+
+get_portlet_slot(portlet_id)
+

Get portlet slot

+
+ +
+
+get_slot_configuration(slot_name)
+

Get slot configuration

+
+ +
+
+get_slot_row(slot_name)
+
+ +
+
+get_slots(row_id)
+

Get ordered slots list

+
+ +
+
+get_slots_width(device=None)
+

Get slots width

+
+ +
+
+rows
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+
+set_portlet_order(order)
+

Set portlet order

+
+ +
+
+set_row_order(order)
+

Change template row order

+
+ +
+
+set_slot_order(order)
+

Set slots order

+
+ +
+
+set_slot_width(slot_name, device, width)
+

Set slot width

+
+ +
+
+slot_config
+
+ +
+
+slot_names
+
+ +
+
+slot_order
+
+ +
+ +
+
+pyams_portal.template.PortalTemplateConfigurationFactory(context)
+

Portal template configuration adapter

+
+ +
+
+class pyams_portal.template.PortalTemplateContainer
+

Bases: zope.container.folder.Folder

+

Portal templates container

+
+
+get_portlet_id()
+
+ +
+
+last_portlet_id
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+class pyams_portal.template.PortalTemplateContainerConfiguration
+

Bases: persistent.Persistent, zope.container.contained.Contained

+

Portal template container configuration

+
+
+toolbar_portlets
+

Computed attributes based on schema fields

+

Field properties provide default values, data validation and error messages +based on data found in field meta-data.

+

Note that FieldProperties cannot be used with slots. They can only +be used for attributes stored in instance dictionaries.

+
+ +
+ +
+
+pyams_portal.template.PortalTemplateContainerConfigurationAdapter(context)
+

Portal template container configuration factory

+
+ +
+
+class pyams_portal.template.PortalTemplatePortletTraverser(context)
+

Bases: pyams_utils.adapter.ContextAdapter

+

++portlet++ template traverser

+
+
+traverse(name, furtherpath=None)
+
+ +
+ +
+
+pyams_portal.template.PortalTemplatePortletsConfigurationAdapter(template)
+

Portal template portlets configuration adapter

+
+ +
+
+class pyams_portal.template.PortalTemplateSlotsVocabulary(context)
+

Bases: zope.schema.vocabulary.SimpleVocabulary

+

Portal template slots vocabulary

+
+ +
+
+class pyams_portal.template.PortalTemplatesVocabulary(context, **kw)
+

Bases: zope.componentvocabulary.vocabulary.UtilityVocabulary

+

Portal templates vocabulary

+
+
+interface = <InterfaceClass pyams_portal.interfaces.IPortalTemplate>
+
+ +
+
+nameOnly = True
+
+ +
+ +
+
+pyams_portal.template.handle_added_template(event)
+

Register shared template

+
+ +
+
+pyams_portal.template.handle_removed_template(event)
+

Unregister removed template

+
+ +
+
+

pyams_portal.views module

+
+
+class pyams_portal.views.PortalContextIndexPage
+

Bases: pyams_default_theme.page.BaseIndexPage

+

Portal context index page

+
+
+get_portlet(name)
+
+ +
+
+page
+
+ +
+
+portlet_configuration
+
+ +
+
+render_portlet(portlet_id)
+
+ +
+
+template_configuration
+
+ +
+ +
+
+

Module contents

+
+
+pyams_portal.includeme(config)
+

Pyramid include

+
+ +
+
+ + +