Thanks for all the useful replies. I learned a lot in the last few
days. Some things that I ended up implementing:

1. a generic BlogFolder class for all my resources that return a list
of posts. I figured out that the context declaration for a view can be
an inherited class, which is great. All the resources that inherit
from the BlogFolder class now have the same default view.

2. you can raise a NotFound exception inside a resource. Which means
that I can do a quick check for valid components in the resource phase
(like a year being 4 digits) but still raise an error when the view
calls my resource to get the posts for a year that doesn't have any.

BTW I love the separation between the view and the renderer, which
means I can completely separate the data returned by various views,
from the template work which makes it pretty for human consumption.
using the json renderer as a default and the json view firefox plugin
makes for a great dev environment.

oO

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to