[Zope-CMF] Required argument for registerDirectory ZCML directive
Dorneles Treméa
dorneles at x3ng.com.br
Sat Jan 19 13:09:07 EST 2008
Hey folks,
I'm wondering if is there any reason for registerDirectory (from
CMFCore.zcml.py) also requiring the 'name' argument when you inform
a value for the 'directory' argument:
"""
def registerDirectory(_context, name, directory=None, recursive=False,
ignore=ignore):
""" Add a new directory to the registry.
"""
if directory is None:
subdir = 'skins/%s' % str(name)
filepath = path.join(_context.package.__path__[0], 'skins',
str(name))
else:
subdir = str(directory[len(_context.package.__path__[0])+1:])
filepath = str(directory)
"""
>From this point and on, only the 'filepath' value is used.
I would say that you only need to specify one of them, but not both,
which seems to be easy to do with invariants.
Am I on the right track? :-)
--
Dorneles Treméa
X3ng Web Technology
http://nosleepforyou.blogspot.com
More information about the Zope-CMF
mailing list