AttributeError on self.request, self.args and self.kwargs (original) (raw)

Checklist

Steps to reproduce

Create a ViewSet and overwrite dispatch method and try to access one of self.request, self.args or self.kwargs before calling super

Expected behavior

It should return the appropriate objects

Actual behavior

It raises AttributeError

This should be related to this Django ticket https://code.djangoproject.com/ticket/19316 which was fixed before 5 years in Django 1.6 and backported to Django 1.5.
The solution is to set these in the decorator generated in as_view method as Django does (django/django@ea6b95d)

I can try to prepare a PR