[ZPT] Default POST type
Sim Harbert
sim.harbert@zapmedia.com
Wed, 18 Apr 2001 11:03:50 -0400
Sorry, but I guess I am not enough of a Zope/Python guru to figure this out
myself. What exactly do I need in the 'PUT_factory' function to get it to
create a Page Template instead of a DTML object? I may get this if I keep
plugging away, but it isn't obvious to me yet.
-Sim
Martijn Pieters wrote:
> On Wed, Mar 28, 2001 at 12:07:56PM -0500, Sim Harbert wrote:
> > It would be really neat if the default type of object
> > created when a POST (or publish) to Zope could be set to
> > Page Template rather than DTML. Having a property set that
> > behavior would probably be the best way to do it in case
> > someone wants the default to stay the way it is.
> >
> > I was realizing this when I create a page using a an editor
> > (in this case Netscape Composer) and the "publishing" it to
> > my Zope server. I either have create the object as a Page
> > Template before publish, or rename and then transfer the
> > contents to a new object I create.
> >
> > This is just in case you run out of things to do. :)
>
> FTP, WebDAV and Netscape Composer us PUT to create and edit files. The
> type of object that is created can be overridden using a special hook; it
> allows you even to create different objects based on the uploaded content.
> This has been implemented since 2.3.0a1:
>
> http://dev.zope.org/Wikis/DevSite/Proposals/HookablePUTCreation
>
> The above proposal explains how it is implemented and what you need to do
> to get it to create a ZPT object for you.
>
> --
> Martijn Pieters
> | Software Engineer mailto:mj@digicool.com
> | Digital Creations http://www.digicool.com/
> | Creators of Zope http://www.zope.org/
> ---------------------------------------------