Skip to main content

Code Lint Python Tests Documentation

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

  1. Install the django-guest-user package from PyPI

  2. Add guest_user to your INSTALLED_APPS and migrate your database

  3. Add guest_user.backends.GuestBackend to your AUTHENTICATION_BACKENDS

  4. Include guest_user.urls in your URLs

  5. 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.

Release files for django-guest-user 0.5.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-guest-user 0.5.5
File Size Uploaded
django_guest_user-0.5.5.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-guest-user 0.5.5
File Interpreter ABI Platform
django_guest_user-0.5.5-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / django_guest_user-0.5.5.tar.gz

Download URL django_guest_user-0.5.5.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a170624c27914dee471f3c6b9574dca246ca9e01c7bd1eae83c9c2b3579aac22
BLAKE2b-256 checksum
How to use checksums
d640ce2f0eba20c240dd0d9fc5d06c6d6073eced5500d3a1d135bea82f23afb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / django_guest_user-0.5.5-py3-none-any.whl

Download URL django_guest_user-0.5.5-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd77658c45927df584ed69dfd800144593a2ad53246ed325b3c0d0cac58cf1b1
BLAKE2b-256 checksum
How to use checksums
25b05801da817cf1733e2a94b7f7dcbc5d4f898ec6353b45a64dafd6d19383da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

0.5.5 This release

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page