You are not logged in Log in Join
You are here: Home » Members » anthony » patches

Log in
Name

Password

 

Patches, misc bits

This folder contains a bunch of miscellaneous bits and pieces as I find time to upload them.


A bunch of patches to ZCatalog

The following are a bunch of patches to ZCatalog that either haven't made it into the CVS tree (they're in the Collector) or else still need more work (I'd like feedback.)

For the links below, you'll need to save the link directly to disk, rather than try to display them in a window. Either right-click on the link, or else hold down shift when clicking on the link.

Catalog.py
Catalog.py.diff
Trivial change to Catalog.py to make uniqueValuesFor() return a list rather than a tuple. This means the results of a uniqueValuesFor() search can be passed as a search argument to a different catalog search.
There's a unified diff against current CVS version 1.42, or the entire file.
ZCatalog.py
ZCatalog.py.diff
catalogSearch.dtml
catalogSearchResults.dtml
A bunch of fixes and new features for ZCatalog. In no particular order, these are:
  • replacing 'find' with 'string.find' makes the find pages able to search for pages containing a string.
  • a fix to ZopeFindAndApply that allows indexing of attributes acquired from outside the containing folder.
  • making REQUEST and RESPONSE optional for various management methods - if not passed, the method won't try to do a RESPONSE.redirect(). This makes it easier to script ZCatalog creation inside DTML.
  • A new management tab 'Query', which allows you to query the contents of the ZCatalog. When building complex applications with ZCatalog (see my 'dtml-tree from zcatalog' howto), you end up writing a lot of tiny DTML methods just to dump out the results of a particular query. This makes it a lot easier. Note that this is pretty shiny and new, and I'd really like some feedback on this.
There's a unified diff against CVS version 1.43, or the entire file. In any case, you'll also need catalogSearch.dtml and catalogSearchResults.dtml, which should be dropped into the lib/python/Products/ZCatalog directory.

Support for Sessions in DTML tree tag

The following patch applies a patch to the DTML tree tag to add support for my SQL Session product so that the tree state is stored in the Session, rather than in a cookie.

TreeTag.py with patch applied. This is the current CVS version of TreeTag (as at 1999-11-18).

treetag-session.diff unified diff of the changes to the current CVS version of TreeTag (as at 1999-11-18).