Re: Function views to CBV refactor adventure.

2010-10-24 Thread Andrew Godwin
On 23/10/10 14:28, Luke Plant wrote: You can do it if you do something like this in your views.py: my_view = MyView.as_view() That way you export your view as both a function to be used as a view directly, and a class for further re-use. If your CBV cannot be used directly (e.g. needs to b

Re: Function views to CBV refactor adventure.

2010-10-23 Thread Luke Plant
On Sat, 2010-10-23 at 12:57 +0200, Łukasz Rekucki wrote: > Hi, > > I just started my "academic adventure". The goal is to refactor some > of existing contrib and 3rd party apps to CBV to get a better feel of > the API in real-world. Don't worry, I'm not going to spam this list > with every problem

Function views to CBV refactor adventure.

2010-10-23 Thread Łukasz Rekucki
Hi, I just started my "academic adventure". The goal is to refactor some of existing contrib and 3rd party apps to CBV to get a better feel of the API in real-world. Don't worry, I'm not going to spam this list with every problem I encountered, but there are two things I stumbled on upon almost in