This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zope.interface import Interface | |
from zope.interface import directlyProvides | |
from zope.interface import noLongerProvides | |
from Products.Five.browser import BrowserView | |
from Products.CMFPlone import PloneMessageFactory as _ | |
class ISomeFeatureTarget(Interface): | |
pass | |
class IPossibleSomeFeatureTarget(Interface): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
parts = py | |
[py] | |
recipe = zc.recipe.egg | |
eggs = | |
setuptools | |
interpreter = py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
find-links += | |
http://effbot.org/downloads/ | |
parts = | |
instance | |
omelette | |
extends = | |
http://dist.plone.org/release/4.1-latest/versions.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
parts = py | |
[py] | |
recipe = zc.recipe.egg | |
eggs = lxml | |
interpreter = py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.REQUEST.response.setHeader('Content-Type', 'text/plain') | |
print "digraph %s {" % context.getId() | |
wf = context | |
state_to_trans = [] | |
for state in wf.states.values(): | |
roles = state.getAvailableRoles() | |
roles.sort() | |
permtable = [ ['<FONT POINT-SIZE="10">%s</FONT>' % _ for _ in ['permission', 'acquired'] + roles ] ] | |
for perm in state.getManagedPermissions(): | |
pinfo = state.getPermissionInfo(perm) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Products.Five.browser import BrowserView | |
class LangRedir(BrowserView): | |
"""language redirect""" | |
def __call__(self): | |
target = 'en-ie' | |
for lang in self.context.portal_languages.getRequestLanguages(): | |
if lang in ('de-at', 'de-ch'): | |
target = 'de-at' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zope.interface import Interface | |
from zope.interface import directlyProvides | |
from zope.interface import noLongerProvides | |
from Products.Five.browser import BrowserView | |
from Products.CMFPlone.interfaces import INavigationRoot | |
from Products.CMFPlone import PloneMessageFactory as _ | |
class IPossibleNavigationRoot(Interface): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# versionfinder | |
import re | |
regexp = re.compile('.*\/(.*)-(.*)-py') | |
with open('instance', 'r') as ins: | |
for line in ins.readlines(): | |
res = regexp.match(line) | |
if res is None: | |
continue | |
print "%s = %s" % res.groups() |
NewerOlder