-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Withers wrote: > Martin Aspeli wrote: >>> Why can't IView (or whatever it is) just specify that the constructor >>> must accept a request, response and a template instance? >> Because the template may not be passed in, and even if it is, where >> would it be constructed and how would it be found again? > > See my currying comment later in the thread. > >> then you may as well not have a 'template' attribute for <browser:page >> If you have it done in ZCML, though, you can get a template-only view >> without any Python at all, though: >> >> <browser:page >> for="*" >> template="mytemplate.pt" >> name="my_view" >> permission="zope.Public" >> /> > > yeah, but I'm talking about the horrificness that currently makes the > above work. > > I'm asking whether it really needs to be that bad or whether it could be > more sanely implemented. > > I guess I should just make a branch and have a play or stfu... > > The later is likely to win due to lack of time
Have a look at how pushpage defines its ZCML page directive: no nasty generated classes required: http://agendaless.com/Members/tseaver/software/pushpage/pushpage-0.3/ Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfg8I+gerLs4ltQ4RAn3DAKCaJPbgWZFRaTLxcPEeJ274vAx9hQCfaxvI Y6qfGZLKzDv/j+rfYPvIeNE= =2r6Q -----END PGP SIGNATURE----- _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com