Skip to main content

A set of views and urls for ajax-based logout and logout for Django.

Project description

Python Package

Description

A set of views and urls for ajax-based logout and logout for Django.

Installation

pip install django_ajax_access

or

pipenv install django_ajax_access

Usage

settings.py

AJAX_ACCESS = {
	"LOGIN_RATELIMIT_KEY": "ip",
	"LOGIN_RATELIMIT_RATE": "10/h",
	"LOGIN_RATELIMIT_BLOCK": True,
	"LOGOUT_RATELIMIT_KEY": "ip",
	"LOGOUT_RATELIMIT_RATE": "10/h",
	"LOGOUT_RATELIMIT_BLOCK": True,
}

urls.py

from django.conf.urls import url, include

urlpatterns = [
	...
	url("^access/", include("ajax_access.urls")),
	...
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_ajax_access-0.1.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

django_ajax_access-0.1.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page