This is great. +1. Better than an additional hook. On Friday, November 16, 2012 7:09:40 AM UTC-7, Daniel Sokolowski wrote: > > I like this approach. > > *From:* George Hickman <javascript:> > *Sent:* Thursday, November 15, 2012 7:27 AM > *To:* [email protected] <javascript:> > *Subject:* Re: Class based views: A standard hook for > http-method-independent code > > I have a slightly different proposal, one where we can avoid the extra > hook but hopefully cover everyone's use cases too. > > > https://github.com/ghickman/django/commit/85ac39a481074c25af1ed72a7a12e62ff5425e54 > > I've personally never liked the setting of args, kwargs & request from > within dispatch since it seems like it's feature creep of the dispatch > method. However I'm also in the same boat as many of the other posters here > in needing to do permissions related checks before dispatch is called. > > With my suggestion above you would be able to put your pre-dispatch code > in a subclasses overridden dispatch before calling super while also > depending on args, kwargs & request on self. >
-- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/sOm0GyJ8n2UJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
