danfairs / django-lazysignup

django-lazysignup is a package designed to allow users to interact with a site as if they were authenticated users, but without signing up. At any time, they can convert their temporary user account to a real user account.
BSD 3-Clause "New" or "Revised" License
410 stars 89 forks source link

Ability to use allow_lazy_user with class methods #50

Open reeteshranjan opened 8 years ago

reeteshranjan commented 8 years ago

The allow_lazy_user decorator is not designed to be used with class methods that prevents one from using it with class based views. We have added a new decorator allow_lazy_user_method that accepts the instance/self as required and propagates it through the wrap logic. We have used this version in our project successfully where we needed lazy signup to work with a django rest framework view class.

danfairs commented 8 years ago

Thanks for your PR! Two comments, really:

Thanks!

danfairs commented 8 years ago

(Oh - and sorry for the delay - all my GH notifications are going astray at the moment, and I'm trying to figure out why...)

reeteshranjan commented 8 years ago

I would soon come back with the refactored version and tests. Thanks for your response!