Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #21 (closed defect: fixed)

Opened 14 years ago

Last modified 12 years ago

Corrections to the 20 Minute Wiki Tutorial, Page 4

Reported by: sdelatorre+turbogears@… Owned by: anonymous
Priority: normal Milestone: 0.8
Component: Documentation Version: 0.5
Severity: normal Keywords:
Cc:

Description

I spotted a few errors on Page 4 of the 20 minute wiki tutorial:

  1. SQLObjectNotFound exception
    • I had to import this exception ("from sqlobject import SQLObjectNotFound") before I could use it in the try/except block. The tutorial doesn't mention this.
  2. In the section where the save method is modified to handle the "new" parameter, the second "page.data = data" is redundant. It probably should be removed.
        @turbogears.expose()
        def save(self, pagename, data, submit, new):
            hub.begin()
            if new == "True":
                 page = Page(pagename=pagename, data=data)
             else:
                 page = Page.byPagename(pagename)
                 page.data = data
            page.data = data # <-- Redundant statement.
            hub.commit()
            hub.end()
            turbogears.flash("Changes saved!")
            raise cherrypy.HTTPRedirect("/?pagename=%s" % pagename)
    
  3. The first sentence after the code in #2 should be changed from "As we saw when we created the original FrontPage via the shell, just instantiation an SQLObject is enough to INSERT into the database." to something like "As we saw when we created the original FrontPage via the shell, instantiating a SQLObject results in an INSERT into the database."

In general, great job, and I'll let you know if I spot anything else.

Change History

comment:1 Changed 14 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.8

thanks for the corrections. This is fixed in [45].

Note: See TracTickets for help on using tickets.