Re: FileSystemStorage / CMFEditions integration
Sylvain Thénault <sylvain.thenault-yG1kfhx/[email protected]> Fri, 16 Jun 2006 12:15:35 +0200
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 16 June à 12:05, Encolpe Degoute wrote: > 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. I know. I've reextracted those patch from some client code since I've upgraded dependencies, but I didn't change those nor write unittest since the last time I submit them. If there is a consensus to integrate this into respective products, I'll take the time to write them before integration. > Around FSS patch, you hardcode relation between CMFEdition and FSS but > have you test the impact of your patch with ArrayField and CompoundField ? no, i'wasn't aware about those field types... -- Sylvain Thénault LOGILAB, Paris (France) Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations Développement logiciel sur mesure: http://www.logilab.fr/services Python et calcul scientifique: http://www.logilab.fr/science