This project is thoroughly tested on these setups:
Python 3.8, 3.9, 3.10, 3.11 and 3.12
Django 3.2, 4.0, 4.1, 4.2 and the main branch
In addition, your Django project should be using django.contrib.auth.
How to installInstall the package from PyPI with your favorite package manager:
pip install django-guest-user # or simiar, e.g. poetry add django-guest-user
Add the app to your django:ref/settings:``installed_apps`` and django:ref/settings:``authentication_backends``:
# settings.py INSTALLED_APPS = [ # ... other apps "guest_user", ] AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", # it should be the last entry to prevent unauthorized access "guest_user.backends.GuestBackend", ]
Allow guests to convert to registered users by adding the URLs to your URLconf:
# urls.py urlpatterns = [ # ... other patterns path("convert/", include("guest_user.urls")), ]
Last but not least, prepare the guest user table by running migrations:
Migrating fromdjango-lazysignup
django-guest-user
can be used a a drop-in replacement for django-lazysignup.
Given the temporary nature of guest or lazy users, the packages can be replaced without breaking the functionality of any existing (non-temporary) users.
Note
By uninstalling lazysignup, any current temporary users will lose their associated data and be signed out of their session.
The following decorators and template filters need to be replaced by their respective counterparts.
@allow_lazy_user
➡️ @allow_guest_user
@require_lazy_user
➡️ @guest_user_required
@require_nonlazy_user
➡️ @regular_user_required
Template filter is_lazy_user
➡️ is_guest_user
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4