Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

RestView - a class for creating a view that dispatches based on request.method (via) I finally got around to writing up a simple approach I’ve been using for REST-style view functions in Django that dispatch based on request.method.

1 comment

  1. I wrote something similar a while back. The proof of concept was still on my hard disc: http://dpaste.com/hold/79655/

    As you see you can use __new__ to return a function. This way you would not have to import and instantiate the class in urls.py.

    Henning - 22nd September 2008 02:00 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site