It looks like setting the request/args/kwargs attributes came after the 
original CBGV implementation. 

https://github.com/django/django/commit/ea6b95db
https://code.djangoproject.com/ticket/19316
https://groups.google.com/d/topic/django-developers/7c7aI-slGNc/discussion

I haven't looked closely to see if your proposal might cause problems (you 
could give it a try and see if you can get the Django test suite passing), 
however, changing the signature of those methods would require a 
deprecation path and could result in a lot of churn in user code which 
would probably cause some angst. I'll leave it to users of CGGVs to offer 
an opinion on whether or not it could be worthwhile.

On Friday, October 23, 2015 at 5:51:37 AM UTC-4, Dheerendra Rathor wrote:
>
> Hello all,
>
> With reference to this line: 
> https://github.com/django/django/blob/master/django/views/generic/base.py#L61 
> from django.view.generic.base
> before calling self.dispatch request, args and kwargs attributes have been 
> added to self. So these all are available in self in http_method handlers. 
>
> I think this behaviour is present due to old functional views, but now 
> passing these as arguments to http_method handlers look obsolete.
>
> We can potentially remove these and make http handlers more simple just 
> like
> class CustomView(View):
>     def get(self):
>         request =self.request
>         # code ...
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/356979b7-95fd-436b-8763-4acb6b785531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to