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

Upgrade to Django 2.0 (breaks <2.0) #60

Closed LaundroMat closed 6 years ago

LaundroMat commented 6 years ago

Updated the code to work with Django 2.0 and higher. All tests pass on my local machine, but I haven't used it in a Django app yet (will try soon).

danfairs commented 6 years ago

Hi there! Many thanks for working on this. I'd be happy to merge support for Django 2.0+ and drop support for older versions, as long as that's accompanied by a major version bump.

Looks like some of the Travis CI tests are failing, would be great to take a look at those.

LaundroMat commented 6 years ago

Very happy I can help!

I'll look into building some CI scripts and report back :)

Update: well now, I didn't run the custom_user_tests locally, and they are failing. I'll get to it.

LaundroMat commented 6 years ago

The code is now Django 2.0+ compliant, but breaks with earlier versions of Django.

It seems most if not all of the breaking code can be made backwards compatible again (e.g. checking whether is_authenticated is a method or a property), but I wonder if that's what you'd like (as you said you'd prefer a version bump and drop support for <2.0).

LaundroMat commented 6 years ago

Sorry for these silly commits; I'm trying to find out why the tests fail with Django 2.1

I'll look into it further when I have the time...

LaundroMat commented 6 years ago

Well that went quick :)

glowka commented 6 years ago

:+1:

I had reported #61 and now found this which solves the issue. It would be great to merge this and release!

danfairs commented 6 years ago

OK, it's been a little while (sorry, everyone, sorry...) but I merged this and uploaded to PyPI as version 2.0.0. Thanks @LaundroMat!

LaundroMat commented 6 years ago

That's my first accepted PR ever, thanks 😊