[Zope] Database Connector acquisition
Dieter Maurer
dieter@handshake.de
Tue, 18 Jun 2002 21:39:17 +0200
David Kyte writes:
> I have a shopping catalog which I want to localise.
> In the top folder are SQL queries and a dbase connector.
>
> This provides the UK price catalog.
>
> /db
> /catlog.html
> /catalog.sql
>
> I thought I might be able to create a folder called
> AU for australia, copy the database connector, modify
> it to point to the AU database, then
> aquire the other objects using acquistion.
>
> /AU
> /AU/db
>
> Hence /AU/catalog.html will produce data from the Au database.
>
> However this does not work unless the query is copied into the
> AU folder as well.
>
> I don't want to clone/maintain multiple copies of the same query
> for many countries. Anyone any suggestions
There is an essential rule for acquisition: "Containment before Context".
Please read Jim Fultons acquisition papers (for a Python conference),
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
or maybe, the Zope Book.
You can avoid duplication, when you put the English specific
content in its own "EN" subfolder and keep only the common
infrastructure in the parent folder (i.e. you will get a
symmetric layout with respect to languages).
Dieter