A Django app that lets visitors interact with your site without registration.
Project description
django-guest-user
Allow visitors to interact with your site like a temporary user ("guest") without requiring registration.
Anonymous visitors who request a decorated page get a real temporary user object assigned and are logged in automatically. They can use the site like a normal user until they decide to convert to a real user account to save their data.
Inspired by and as an alternative for django-lazysignup and rewritten for Django 3.2+ and Python 3.8+.
Documentation
Find the complete documentation on Read the Docs.
Quickstart
-
Install the
django-guest-userpackage from PyPI -
Add
guest_userto yourINSTALLED_APPSand migrate your database -
Add
guest_user.backends.GuestBackendto yourAUTHENTICATION_BACKENDS -
Include
guest_user.urlsin your URLs -
Decorate your views with
@allow_guest_user:from guest_user.decorators import allow_guest_user @allow_guest_user def my_view(request): assert request.user.is_authenticated return render(request, "my_view.html")
A more detailed guide is available in the installation documentation.
Contributing
All contributions are welcome! Please read the contributing guidelines in this repostory.
Development Status
This project is under active development. Thanks to previous work the core functionality is well-established and this package builds on top of it.
This project was created because the original project has been in an inactive state without major updates in a long time. The code base was rewritten with only modern versions of Python and Django in mind.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_guest_user-0.5.5.tar.gz.
File metadata
- Download URL: django_guest_user-0.5.5.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a170624c27914dee471f3c6b9574dca246ca9e01c7bd1eae83c9c2b3579aac22
|
|
| MD5 |
7e79ee97da4d8472acef5e66c02b4579
|
|
| BLAKE2b-256 |
d640ce2f0eba20c240dd0d9fc5d06c6d6073eced5500d3a1d135bea82f23afb5
|
File details
Details for the file django_guest_user-0.5.5-py3-none-any.whl.
File metadata
- Download URL: django_guest_user-0.5.5-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd77658c45927df584ed69dfd800144593a2ad53246ed325b3c0d0cac58cf1b1
|
|
| MD5 |
70978695ad26d4bdb7aafe4a4203ac56
|
|
| BLAKE2b-256 |
25b05801da817cf1733e2a94b7f7dcbc5d4f898ec6353b45a64dafd6d19383da
|