# -*- coding: utf-8 -*-
"""
This module scans all direct submodules for component registrations in this
package when included for zope.configuration with venusianconfiguration.

"""
from transmogrifier_ploneblueprints import pipelines
from venusianconfiguration import configure
from venusianconfiguration import scan

import importlib
import os
import pkg_resources


# Scan modules
for resource in pkg_resources.resource_listdir(__package__, ''):
    name, ext = os.path.splitext(resource)
    if ext == '.py' and name not in ('__init__', 'configure', 'testing'):
        path = '{0:s}.{1:s}'.format(__package__, name)
        scan(importlib.import_module(path))


configure.include(package=pipelines, file='configure.py')
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
from venusianconfiguration import scan

from collective.atrfc822 import fields

scan(fields)
Exemplo n.º 3
0
    None,
)  # noqa
plone.supermodel.exportimport.ChoiceHandler.filteredAttributes.pop(
    'defaultFactory',
    None,
)  # noqa

i18n_domain('collective.flow')
configure.i18n.registerTranslations(directory='locales')

configure.permission(
    id=u'flow.AuthorPortalContent',
    title=u'collective.flow: Author portal content',
)

scan(behaviors)
scan(buttons)
scan(comments)
scan(content)
scan(defaults)
scan(fields)
scan(history)
scan(schema)
scan(subfolder)
scan(transforms)

configure.include(package=browser, file='__init__.py')

if has_package('plone.restapi'):
    from collective.flow import restapi
    import plone.rest
Exemplo n.º 4
0
from venusianconfigdemo import views
from venusianconfigdemo import adapters
from venusianconfigdemo.interfaces import IVenusianConfigDemoLayer
from venusianconfigdemo.viewlets import LogoViewlet

_ = MessageFactory('venusianconfigdemo')

configure.i18n.registerTranslations(directory='locales')

configure.browser.resourceDirectory(
    name='venusianconfigdemo',
    directory='static'
)

scan(views)
scan(adapters)

configure.meta.provides(feature='demofeature')

configure.browser.page(
    name='hello-world-template',
    for_='*',
    template='templates/hello_world.pt',
    permission='zope2.View',
    condition='have demofeature'
)

configure.include(
    package='.portlets',
    file_='configure.py'
# -*- coding: utf-8 -*-
"""
This module scans all direct submodules for component registrations in this
package when included for zope.configuration with venusianconfiguration.

"""
import importlib
import os

import pkg_resources
from venusianconfiguration import configure
from venusianconfiguration import scan


# Scan modules
for resource in pkg_resources.resource_listdir(__package__, ''):
    name, ext = os.path.splitext(resource)
    if ext == '.py' and name not in ('__init__', 'configure', 'testing'):
        path = '{0:s}.{1:s}'.format(__package__, name)
        scan(importlib.import_module(path))

from transmogrifier_ploneblueprints import pipelines
configure.include(package=pipelines, file='configure.py')
Exemplo n.º 6
0
from collective.flow.browser import history
from collective.flow.browser import menu
from collective.flow.browser import schema
from collective.flow.browser import subfolder
from collective.flow.browser import submission
from collective.flow.browser import viewlets
from collective.flow.browser import widgets
from venusianconfiguration import configure
from venusianconfiguration import scan


# BBB: Plone < 5.1
try:
    # noinspection PyUnresolvedReferences
    from collective.flow.browser import submission_subform
    scan(submission_subform)
except ImportError:
    pass

scan(comments)
scan(folder)
scan(subfolder)
scan(schema)
scan(submission)
scan(widgets)
scan(viewlets)
scan(menu)
scan(history)

configure.plone.static(
    directory='static',
Exemplo n.º 7
0
# -*- coding: utf-8 -*-
from venusianconfiguration import (configure, scan)

import plone.behavior
import plone.app.dexterity

from example.uidattrbehavior import behaviors

from zope.i18nmessageid import MessageFactory
_ = MessageFactory('example.uidattrbehavior')

configure.include(package=plone.app.dexterity)
configure.include(package=plone.behavior, file_='meta.zcml')

configure.i18n.registerTranslations(directory='locales')

scan(behaviors)

configure.gs.registerProfile(
    name=u'default',
    title=_(u'UID Attr Behavior'),
    description=_(u'Provides UID attr for Dexterity content objects'),
    directory=u'profiles/default',
    provides=u'Products.GenericSetup.interfaces.EXTENSION')
# -*- coding: utf-8 -*-
from venusianconfiguration import (
    configure,
    scan
)

import plone.behavior
import plone.app.dexterity

from example.uidattrbehavior import behaviors

from zope.i18nmessageid import MessageFactory
_ = MessageFactory('example.uidattrbehavior')

configure.include(package=plone.app.dexterity)
configure.include(package=plone.behavior, file_='meta.zcml')

configure.i18n.registerTranslations(directory='locales')

scan(behaviors)

configure.gs.registerProfile(
    name=u'default',
    title=_(u'UID Attr Behavior'),
    description=_(u'Provides UID attr for Dexterity content objects'),
    directory=u'profiles/default',
    provides=u'Products.GenericSetup.interfaces.EXTENSION'
)