julianwachholz / django-guest-user

A Django app that allows visitors to interact with your site as a guest user without requiring registration.
https://django-guest-user.readthedocs.io/
MIT License
74 stars 10 forks source link

RFC on a changing GuestManager.convert to update in-place #4

Closed mbhynes closed 1 year ago

mbhynes commented 1 year ago

Hi @julianwachholz,

First off, thank you very much for maintaining this package for new versions of Django!

I've opened this ticket to propose a relatively simple change (or addition) of the GuestManager in the package that I think would enable greater functionality for devs wanting to create guest users.

Background

Business Use Case

I started using this package to enable guest users functionality on a site, with the goal that:

After reading the documentation for django-guest-user I didn't see any flags that stated this usage wasn't possible, but after installing the package and trying to use it, to the best of my understanding, the use case above is not supported. I think this has also been raised previously in https://github.com/julianwachholz/django-guest-user/issues/3.

EDIT:

Thanks very much for your time!

julianwachholz commented 1 year ago

Heya! Thanks for the kind words! I'm going to have to take a deeper look into your other concerns one by one at a later date but I want to address your first point, the business use case.

What you're describing is exactly how guest users are intended to be used and working. It's possible you may have found a bug where converting will create a new user instead of only deleting the Guest instance?

The last line in this test verifies that converting a Guest keeps the User PK

mbhynes commented 1 year ago

Thanks very for your reply! I must have something miscondigured on my end, and I'll take a closer look.

mbhynes commented 1 year ago

Ah, I see my problems:

Thanks very much for your time and helping me debug from afar ...