[![Code Lint](https://github.com/julianwachholz/django-guest-user/actions/workflows/lint.yml/badge.svg)](https://github.com/julianwachholz/django-guest-user/actions/workflows/lint.yml)
[![Python Tests](https://github.com/julianwachholz/django-guest-user/actions/workflows/test.yml/badge.svg)](https://github.com/julianwachholz/django-guest-user/actions/workflows/test.yml)
[![Documentation](https://readthedocs.org/projects/django-guest-user/badge/?style=flat)](https://django-guest-user.readthedocs.io)
# 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](https://github.com/danfairs/django-lazysignup)
and rewritten for Django 3.2+ and Python 3.7+.
## Documentation
Find the [**complete documentation**](https://django-guest-user.readthedocs.io/)
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`:
```python
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](https://django-guest-user.readthedocs.io/en/latest/setup.html#how-to-install).
## Contributing
All contributions are welcome! Please read the
[contributing guidelines](CONTRIBUTING.md) in this repostory.
## Development Status
This project is under active development. Thanks to
[previous work](https://github.com/danfairs/django-lazysignup) 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/julianwachholz/django-guest-user",
"name": "django-guest-user",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Julian Wachholz",
"author_email": "julian@wachholz.ch",
"download_url": "https://files.pythonhosted.org/packages/40/ed/cb2d4b26c0113a9f4ac8f8bed15d754d8bc18fd6c87d7266ca4ecfc1f3a9/django_guest_user-0.5.4.tar.gz",
"platform": null,
"description": "[![Code Lint](https://github.com/julianwachholz/django-guest-user/actions/workflows/lint.yml/badge.svg)](https://github.com/julianwachholz/django-guest-user/actions/workflows/lint.yml)\n[![Python Tests](https://github.com/julianwachholz/django-guest-user/actions/workflows/test.yml/badge.svg)](https://github.com/julianwachholz/django-guest-user/actions/workflows/test.yml)\n[![Documentation](https://readthedocs.org/projects/django-guest-user/badge/?style=flat)](https://django-guest-user.readthedocs.io)\n\n# django-guest-user\n\nAllow visitors to interact with your site like a temporary user (\"guest\")\nwithout requiring registration.\n\nAnonymous visitors who request a decorated page get a real temporary user object\nassigned and are logged in automatically. They can use the site like a normal\nuser until they decide to convert to a real user account to save their data.\n\nInspired by and as an alternative for [django-lazysignup](https://github.com/danfairs/django-lazysignup)\nand rewritten for Django 3.2+ and Python 3.7+.\n\n## Documentation\n\nFind the [**complete documentation**](https://django-guest-user.readthedocs.io/)\non Read the Docs.\n\n## Quickstart\n\n1. Install the `django-guest-user` package from PyPI\n2. Add `guest_user` to your `INSTALLED_APPS` and migrate your database\n3. Add `guest_user.backends.GuestBackend` to your `AUTHENTICATION_BACKENDS`\n4. Include `guest_user.urls` in your URLs\n5. Decorate your views with `@allow_guest_user`:\n\n ```python\n from guest_user.decorators import allow_guest_user\n\n @allow_guest_user\n def my_view(request):\n assert request.user.is_authenticated\n return render(request, \"my_view.html\")\n ```\n\nA more detailed guide is available in the\n[installation documentation](https://django-guest-user.readthedocs.io/en/latest/setup.html#how-to-install).\n\n## Contributing\n\nAll contributions are welcome! Please read the\n[contributing guidelines](CONTRIBUTING.md) in this repostory.\n\n## Development Status\n\nThis project is under active development. Thanks to\n[previous work](https://github.com/danfairs/django-lazysignup) the core\nfunctionality is well-established and this package builds on top of it.\n\nThis project was created because the original project has been in an inactive\nstate without major updates in a long time. The code base was rewritten with\nonly modern versions of Python and Django in mind.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Django app that lets visitors interact with your site without registration.",
"version": "0.5.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4af74d10bc32b0898e9b6ef906b7e1f84c7a1aec274d5e1231c5f978854d9d98",
"md5": "f3fca1138e1a37d3d081c7a9bd5bb9f8",
"sha256": "8ca777438cc05ceff5d6de6097c3a5dc369dc5b3913f767f8b442399ae469616"
},
"downloads": -1,
"filename": "django_guest_user-0.5.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f3fca1138e1a37d3d081c7a9bd5bb9f8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 21873,
"upload_time": "2023-03-20T22:22:37",
"upload_time_iso_8601": "2023-03-20T22:22:37.893383Z",
"url": "https://files.pythonhosted.org/packages/4a/f7/4d10bc32b0898e9b6ef906b7e1f84c7a1aec274d5e1231c5f978854d9d98/django_guest_user-0.5.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "40edcb2d4b26c0113a9f4ac8f8bed15d754d8bc18fd6c87d7266ca4ecfc1f3a9",
"md5": "39d19491bf509666ede572716e73c21b",
"sha256": "12e63182469ae77b9109e752c406e5ba1fb0bdebe06e809f6421a08dda6ca4f9"
},
"downloads": -1,
"filename": "django_guest_user-0.5.4.tar.gz",
"has_sig": false,
"md5_digest": "39d19491bf509666ede572716e73c21b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 15587,
"upload_time": "2023-03-20T22:22:39",
"upload_time_iso_8601": "2023-03-20T22:22:39.255581Z",
"url": "https://files.pythonhosted.org/packages/40/ed/cb2d4b26c0113a9f4ac8f8bed15d754d8bc18fd6c87d7266ca4ecfc1f3a9/django_guest_user-0.5.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-20 22:22:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "julianwachholz",
"github_project": "django-guest-user",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-guest-user"
}