Re: FileSystemStorage / CMFEditions integration
Encolpe Degoute <[email protected]> Fri, 16 Jun 2006 12:05:13 +0200
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
Sylvain Thénault a écrit : > Hi there ! > > This morning I took the time to extract proper patches that I had have > to write to have FileSystemStorage fields working properly with > CMFEditions versioning. For this I had to patch: > > * CMFEditions, to: > * give a rollback flag to afterRetrieveModifier, allowing to know > in a modifier if an object is retieved for a rollback or not (simple > view of an old version) > * handle a .retrieved_version_id attribute on versioned object to know > the cmfedition version number of an object (at the time at wrote the > patch, I didn't find any attribute giving this information as I'ld > have expected, version_id wasn't suiting my need) > > * FileSystemStorage, to: > * handle version number in generated file name > * store fssinfo into different attribute according to object's version > (I don't know enough about cmfeditions'internals to explain that, > but I had have to do this to properly deals with file deletion and > maybe other problems i don't remember right now) > > * Archetypes'file widget macro to include version number into its > download link > > and finally to write a modifier, dealing with filesystem files on > version creation/rollback. > > As you can see, the problem is that it introduces some cmfeditions > related code into FSS and Archetypes. However this is in restricted > place and doesn't cause any problem if cmfeditions is not used or even > installed, and this integration seems to me potentially interesting for > others, so I wish to integrate it into the main stream of those 3 > products. Is someone object on this or have any comment regarding the > patches? (see attached files) Hi, Like previous patch you give there you add features but there's no unit tests with them. Around FSS patch, you hardcode relation between CMFEdition and FSS but have you test the impact of your patch with ArrayField and CompoundField ? Regards, -- Encolpe DEGOUTE http://encolpe.degoute.free.fr/ Logiciels libres, hockey sur glace et autres activités cérébrales