I am creating a django app where users answer different questions in a survey, but if they have not logged in, their votes will be removed after three days.
The way I do it at the moment is as follows:
Once an anonymous user tries to answer a question, I create a new user, log them in and assign the answers. Once the user wants to create an account, I'll have them change their details.
The annoying side effect of this approach is: When I clandestinely create an account for an anonymous user to allow the voting, I have to pretend towards the user that they are not logged in. This is annoying with using the standard admin views and templates in general as I have to check an additional property, that tells me if I have automatically created the user or if the user themselves did it.
Is there a better way?