I actually have an updated 20 minute wiki tutorial for 0.9. I do like
this replacement of the "new" flag, though, and I'll incorporate that.

Kevin

On 2/20/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> 2 things
> * that was written for 0.8* therefore you should expect somethings not to
> work.
> * the idea behind wiki tutorial is show people the basic features of it
> therefore showing diferent ways of doing things is a good idea.
>
> On 2/16/06, Damjan <[EMAIL PROTECTED]> wrote:
> >
> > Also, about the wiki tutorial... I have a suggestion about the part on
> > clicking links to non-existing pages.
> >
> > Instead of carying that magic "new" flag everywhere in edit.kid and in
> > the "save" method... the edit and save methods might reuse the try:
> > except SQLObjectNotFound: pattern already learned in the index method.
> >
> > Like so:
> >
> >
> >     def save(self, pagename, data, **kwds):
> >         hub.begin()
> >         try:
> >             page = Page.byPagename (pagename)
> >             page.data = data
> >         except SQLObjectNotFound:
> >             page = Page(pagename=pagename, data=data)
> >         hub.commit()
> >         hub.end()
> >         turbogears.flash("Changes saved!")
> >         raise cherrypy.HTTPRedirect("/%s" % pagename)
> >
> >     def edit(self, pagename):
> >         try:
> >             page = Page.byPagename(pagename)
> >         except SQLObjectNotFound:
> >             return dict(pagename=pagename, data="")
> >
> >
>


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to