[Zope3-Users] Using ZCML for defining global constants ?

2006-09-10 Thread Andrew Groom
Hi there, I've got a few global constants that I'd like to be available to my application and a .zcml file seems to be a sensible place. I'm thinking of something like a .zcml file with, e.g.: applicationSettings setting name=name1 value=value1/ setting name=name2

[Zope3-Users] Local configuration settings via ZCML

2006-09-24 Thread Andrew Groom
Hi All, I have a component that's doing a database connection, and the connection is described in configure.zcml as: rdb:provideConnection name='my_db' component='psycopgda.adapter.PsycopgAdapter' dsn='dbi://user:[EMAIL PROTECTED]/dbname' / The problem

[Zope3-Users] Setting custom content type when publishing a resource

2006-10-16 Thread Andrew Groom
Hi All, I want to do something that feels like it should be really simple: set a specific content type when a particular resource is published (a Firefox extension, a binary .xpi file if it helps). Any ideas how I could do that ? I've tried playing round with variations of: class

Re: [Zope3-Users] Setting custom content type when publishing a resource

2006-10-18 Thread Andrew Groom
at 0x4129aaac) So, self.context is a folder object. The file that I'm publishing is coming from the filesystem - could that be the problem ? Cheers, Andrew. FB wrote: Hi, On Wed, Oct 18, 2006 at 12:45:50PM +1300, Andrew Groom wrote: FB wrote: Hi, On Tue, Oct 17, 2006 at 12:53:48PM +1300, Andrew

Re: [Zope3-Users] Setting custom content type when publishing a resource

2006-10-18 Thread Andrew Groom
Excellent, thanks Frank. I've managed to get it working now. Cheers, Andrew. FB wrote: Hi, On Wed, Oct 18, 2006 at 07:58:45PM +1300, Andrew Groom wrote: [snip] browser:page for=* name=vortexgdna.xpi class

[Zope3-Users] sqlobject problem

2006-11-07 Thread Andrew Groom
Hi All, I've got a Zope3 app consisting of some sqlos classes for database access (against a postgres database) and I need to write a script for some batch processing of database content outside of Zope. The problem is that when I try to initialize a connection for sqlos objects, e.g.:

[Zope3-Users] Change site-wide error logging behaviour

2007-02-15 Thread Andrew Groom
Hi All, I need to change the default error logging behaviour to send me an email when there's an error. I'm guessing this involves adapting an interface in etc/overrides.zcml or something like that - has anyone done this before and, if so, is willing to share some code ? :-) Much appreciated.

Re: [Zope3-Users] Add unittest

2007-04-17 Thread Andrew Groom
Hi Florian, I've had some success with: import unittest class MyTestClass (unittest.TestCase): def test_something (self): ... def test_suite (): return unittest.TestLoader().loadTestsFromTestCase(MyTestClass) if __name__ == '__main__':

Re: Vedr. [Zope3-Users] Zope 3 API documentation needs a new strategy

2007-07-18 Thread Andrew Groom
Luciano Ramalho wrote: And finally, the wiki Documentation page does not mention the abundant README.txt files scattered all over the source tree where the real documentation exists. Yup, I agree that the README.txt's have a lot of useful info but how would you know to look for them if you

[Zope3-Users] Using zope.formlib for a search form

2007-08-09 Thread Andrew Groom
Hi All, I've been battling with formlib for the last three days now and, while I've learnt a lot, it's nearly driven me crazy. I'm trying to use it to create simple search form, i.e., a form that does input validation, remembers the values you entered, etc., but is not tied to a persisted

Re: [Zope3-Users] Using zope.formlib for a search form

2007-08-12 Thread Andrew Groom
Thanks for that, Hermann. Yes, it looks like I should have gone straight to z3c.form instead :-) Oh well, a good learning exercise. Cheers, Andrew. Hermann Himmelbauer wrote: Am Freitag, 10. August 2007 04:14 schrieb Andrew Groom: Hi All, I've been battling with formlib for the last three

[Zope3-Users] WorldCookery sample application

2007-10-17 Thread Andrew Groom
Hi All, Has anyone managed to get the worldcookery application from worldcookery.com to run ? I get a number of import errors when installing it in a Zope 3.2.1 instance. Cheers, Andrew. --- Reurbanise - Urban Sustainability ph: (03) 3528 055, mobile: 0274 992