Skip to main content

This package contains Lona helper to integrate with Django.

Installation

$ pip install lona-django

Django Auth

Django authentication, authorization and sessions are implemented in a Lona middleware.

# settings.py

MIDDLEWARES = [
    'lona_django.middlewares.DjangoSessionMiddleware',
]

To configure authorization use the view flags listed below. The flags are all optional and can be mixed.

The Django user associated with the given request is available in request.user.

# views.py

from lona import LonaView

class DjangoView(LonaView):
    DJANGO_AUTH_LOGIN_REQUIRED = False
    DJANGO_AUTH_STAFF_REQUIRED = False
    DJANGO_AUTH_STAFF_PERMISSION_OVERRIDE = True
    DJANGO_AUTH_PERMISSIONS_REQUIRED = []
    DJANGO_AUTH_GROUPS_REQUIRED = []

    def handle_request(self, request):
        user = request.user

Metadata

Release files for lona-django 0.1.1

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

Source distribution (sdist)

Source distribution for lona-django 0.1.1
File Size Uploaded Provenance
lona-django-0.1.1.tar.gz 4.3 kB Without provenance Details

Release files / lona-django-0.1.1.tar.gz

Download URL lona-django-0.1.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
15fda474278d0e9ae9ae923ee83cb60fa2f1308417776a701385ad1fded43e50
BLAKE2b-256 checksum
How to use checksums
5440ce57aaf73925285d200318fe9de43e17c2c712aeb776b8b25e97ade3b326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.7.9

Security for lona-django 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

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