I have forked bfirsh's code as well on github: http://github.com/fitzgen/django-class-based-views
<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 self.request. All feedback is very welcome! :) _Nick_ On Wed, Jun 16, 2010 at 4:14 PM, daonb <bennyd...@gmail.com> wrote: > On Jun 16, 4:45 pm, Ben Firshman <b...@firshman.co.uk> wrote: > > > > The request is passed round so methods look like views to decorators. > Magically dropping it for decorators seems a bit scary. :/ > > > > The way I see it a good framework need to establish a clear contract > with its user. In our case, Django publishes a contract ensuring the > user that when he inherits from View and overrides any of: GET, POST, > UPDATE, DELETE,get_response, get_content, get_resource, render_html, > get_template, get_context and a few others, the request attribute of > self is current. > > I agree stripping the request looks a bit scary, but at least it's > only 5 lines of simple code:-). They way I see it, decorators are > global so they need the request and Django adds it for them. When the > global decorators are done, Django can strip the request and get the > user to trust our contract. > > Benny. > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-develop...@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com<django-developers%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.