Задать вопрос

Тел: +7 965 3737 888

465

Просмотров

3

Ответов

RestView - class for creating a view that dispatches based on request.method

Sometimes it's useful to dispatch to a different view method based on request.method - e.g. when building RESTful APIs where GET, PUT and DELETE all use different code paths. RestView is an extremely simple class-based generic view which (although it's a stretch to even call it that) which provides a simple mechanism for dividing up view logic based on the HTTP method.

Вопрос полезен? Да0/Нет0
file_4785.py(1.5Кб)
None

Ответы (3):

Ответshemigon:14.11.2009
Ответ полезен? Да0/Нет0

I solved this problem using url patterns with name parameter

Ответa.v.khodyrev:24.07.2009
Ответ полезен? Да0/Нет0

How does one use this with 'reverse'?

Ответsimon:22.09.2008
Ответ полезен? Да0/Нет0

Hah! I was sure someone else had done this before (it's an obvious approach) but my Google-fu failed me.