Update views.py

I hope that you can appreciate this changes, I've modified this class to work nicely with other class based views. especially I'm using it with django-tables2 and appears to be compatible