Hi Charlie!

Charlie Clark wrote:
> I've hit a bit of a problem with folder syndication - I already have an
> annotations adapter for storing the values on the folder and I can extend
> this to be able to handle individual values rather than a dictionary but
> ProxyFieldProperties don't work because the adapter itself doesn't support
> properties. I also have some additional methods on the adapter that I use
>   from the view. What do you think is the best way to proceed here? Subclass
> the SchemaAdapter so that the encoding and DateTime stuff works okay? For
> the methods I don't see any alternative but to expose the annotations
> adapter explicitly within the view. Bit of a muddle, I guess.

If you want to modernize SyndicationInformation, why do you still store 
DateTime objects in the database? (And why don't you use zope.annotation?)

Quoting the docstring of schema.py: "SchemaAdapterBase and 
ProxyFieldProperty are legacy code. They should only be used to adapt 
old content types that can't handle unicode and datetime correctly."

AFAICS only the getUpdateBase method of ISyndicationTool needs to be 
backwards compatible. Everything else is new API or doesn't return 
DateTime objects. Wouldn't it be better to use datetime internally? You 
already need an upgrade step for SyndicationInformation. Writing an 
additional upgrade step for SyndicationTool wouldn't be much extra work.


Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to