Re: Class based generic views in 1.3?

2010-05-13 Thread Nick Fitzgerald
Luke, Good points, especially about wrapping decorators *after* instantiation to avoid the whole nasty self issue. While I personally don't mind meta classes at all, I understand why some people do. I think you are probably on the right track here. _Nick_ On Thu, May 13, 2010 at 4:08 AM, Luke

Re: Class based generic views in 1.3?

2010-06-15 Thread Nick Fitzgerald
Another option that hasn't come up is to just have a custom __setattr__ that won't let users write to self (therefore providing primitive thread safety). I don't think it is a /good/ option, but I am just throwing it out there for completeness. _Nick_ On Tue, Jun 15, 2010 at 7:10 AM, Patryk Zaw

Re: Class based generic views in 1.3?

2010-06-16 Thread Nick Fitzgerald
I have forked bfirsh's code as well on github: http://github.com/fitzgen/django-class-based-views I have changed the code to use __new__ rather than copying self. I have also merged in daonb's commit to make request implicit to all methods via se

Re: Class based generic views in 1.3?

2010-06-17 Thread Nick Fitzgerald
> > It's still possible in exactly the same way as you do it today: > mydata = ... > urlpatterns('', url('...', 'MyView', {'outside_of_lifecycle': mydata})) > > Alternatively, you can derive from MyView: > class SubMyView(MyView): >ouside_of_lifecycle = mydata > > However, I don't think that th