1👍
If your asking about multiple users sharing the same account or even session, this is a very bad idea. Have you looked at django-guest? It allows guest user accounts and is what your looking for. It provides two decorators, guest_allowed
and login_required
which can be applied to your views. So a user can view as a ‘generic guest’ while you still have some control and can track them.
Also Django has `class models.AnonymousUser’ but this is just a status given to users not logged in and maybe be what your after.
1👍
Here is how I would do it:
Create a multi paged form.
- Page 1 – Survey Password (validator/clean method to make sure that the password entered is valid)
- Page 2 – Survey Questions
Use Django’s Form Wizard: https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/
the wizard shows page 1 and wont let the user get to page 2 until the user answers page 1 correctly (ie password). That way users cannot get to the survey unless they have a valid password.
This solution doesn’t use django’s auth and should get you around all the session stuff thats blocking you from moving forward.
- [Answered ]-Django – grabbing error message from MySQL trigger via handling OperationalError
- [Answered ]-Retrieving OneToOne related QuerySet in Django
- [Answered ]-Get Latest Article in Two Combined Django Queryset That's Converted to a List