[Zope3-checkins] CVS: Zope3/src/zope/app/sqlexpr - __init__.py:1.2
configure.zcml:1.2
Philipp von Weitershausen
philikon at philikon.de
Wed Mar 3 21:11:37 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/sqlexpr
In directory cvs.zope.org:/tmp/cvs-serv22017
Modified Files:
__init__.py configure.zcml
Log Message:
Register expression type through our new ZCML directive; drop the old
hackish monkey-patch-like registration.
=== Zope3/src/zope/app/sqlexpr/__init__.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/sqlexpr/__init__.py:1.1 Fri Feb 27 09:39:41 2004
+++ Zope3/src/zope/app/sqlexpr/__init__.py Wed Mar 3 21:11:37 2004
@@ -1,23 +1 @@
-##############################################################################
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""SQL Expression Package
-
-$Id$
-"""
-from zope.app.pagetemplate.engine import Engine
-from sqlexpr import SQLExpr
-
-# XXX: Almost a classic monkey patch. We really should have a ZCML directive
-# for this.
-Engine.registerType('sql', SQLExpr)
+# make this directory a package
=== Zope3/src/zope/app/sqlexpr/configure.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/app/sqlexpr/configure.zcml:1.1 Fri Feb 27 09:39:41 2004
+++ Zope3/src/zope/app/sqlexpr/configure.zcml Wed Mar 3 21:11:37 2004
@@ -1,8 +1,12 @@
<configure
xmlns="http://namespaces.zope.org/zope"
- i18n_domain="sqlexpr"
+ xmlns:tales="http://namespaces.zope.org/tales"
+ i18n_domain="zope"
>
- <!-- Empty configuration file -->
+ <tales:expressiontype
+ name="sql"
+ handler=".sqlexpr.SQLExpr"
+ />
</configure>
More information about the Zope3-Checkins
mailing list