Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Boomarker and code differences

2 views
Skip to first unread message

bsouthey

unread,
Aug 1, 2007, 12:28:37 PM8/1/07
to tg.book
Hi,
I noticed that Figures 5.2 and 5.3 html Title is 'Boomaker'. This also
occurs in the code (bookmarker-v2/bookmarker/templates/form.kid) that
I just downloaded from the book web site (http://turbogearsbook.com/
code.html). So while the book and code is consistent, it is perhaps
not what you intended.

Also, in terms of the code for at least chapters 4 and 5, could these
be created with a consistent directory structure?
Chapter 4 code is bookmarker-v1.zip has structure: bookmarker-V1/
bookmarker0.9a1
Chapter 5 code has two parts:
5a : bookmarker-v2.zip with structure: bookmarker-v2
5b: bookmarker-v3.zip with structure: bookmarker/

Where does the split in the chapter 5 code occur in the book?
>From the bookmarker-v2.zip this appears to sections 5.1, 5.2 and 5.3.

So 5b should be the remaining sections of the chapter but it is not
quite the same. From the code for 5b, it appears that Identity was
selected when the project was created (imports the Identity module
etc.).

Also the last line of save_bookmark code (page 78) is different than
the code. So, is there a difference between the book:

raise redirect("/index")

and the code that uses:

raise cherrypy.HTTPRedirect("/index")

?

Thanks
Bruce

Mark Ramm

unread,
Aug 1, 2007, 7:10:59 PM8/1/07
to tgb...@googlegroups.com
Yea, chapter 5 used to be chapters 5 and 6, but my publisher asked me
to combine them at the last min. This change has caused lots more
trouble than it was worth :(

Anyway, I think the structure isn't too complicated. The /bookmarker
one is the most complete (more complete than what made it into the
combined chapter 5 actually) version. The other two versions are v1
and v2 which are pretty self explanitory.

You are right to peg the switch from v2 to the full code at the
beginning of 5.4.

As for the redirection code, both should work, but importing redirect
and calling it directly is a lot less verbose, so the code in the book
is to be preferred I think.

--Mark


--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

Joe Baker

unread,
Aug 2, 2007, 12:28:43 PM8/2/07
to tgb...@googlegroups.com
I think on page 193 each of the classes should inherit from "SQLObject"
instead of just "object".

Joe Baker

Mark Ramm

unread,
Aug 2, 2007, 12:53:40 PM8/2/07
to tgb...@googlegroups.com
That's absolutely right.

I have no idea if it was wrong in the draft and somehow slipped
through the technical edit loops, or alternately how it got changed
after the technical edit. (I've seen both things happen in other
places on the book.

One thing I've learned from this book is that I need to be very
personally involved in checking the code at the final draft stage!

The SQLAlchemy book will be much, much better in that way.

--Mark Ramm

Reply all
Reply to author
Forward
0 new messages