Blog Post List error handling

16 views
Skip to first unread message

Josh Cartmell

unread,
May 14, 2013, 1:31:11 PM5/14/13
to mezzani...@googlegroups.com
I just noticed that doing things like this:
http://mezzanine.jupo.org/blog/archive/2013/asdga/
results in 500 errors rather than 404s.  I'm wondering if it might not be a bad idea to wrap the various lookups like
blog_posts = blog_posts.filter(publish_date__year=year)
in a try except and catch value errors raising a 404 if they are caught.
Does anyone else have thoughts on this?

Stephen McDonald

unread,
May 14, 2013, 5:03:09 PM5/14/13
to mezzani...@googlegroups.com
Thanks Josh. The urlpattern was a bit too permissive, fixed here:

--
You received this message because you are subscribed to the Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Stephen McDonald
http://jupo.org

Josh Cartmell

unread,
May 14, 2013, 5:25:23 PM5/14/13
to mezzani...@googlegroups.com
Thanks Steve, I hadn't even thought about the urlpatterns, but that's definitely a way better fix than my idea.

Reply all
Reply to author
Forward
0 new messages