Skip to main content

Library provides customization of AnonymousUser in Django

Project description

# django-custom-anonymous

Library provides customization of AnonymousUser.

Works with Python >= 2.6, >= 3.2, Django >= 1.5, >= 2.0.

## Installation

pip install django-custom-anonymous

## Customization

Add to `settings`:

AUTH_ANONYMOUS_MODEL = 'your_app.module.CustomAnonymousUser'

Add to middlewares:


Create your own anonymous (for example):

from django.contrib.auth.models import AnonymousUser as DjangoAnonymousUser
class CustomAnonymousUser(DjangoAnonymousUser):
ip = None

def __init__(self, request):
self.ip = request.META.get('REMOTE_ADDR')
super(AnonymousUser, self).__init__()

Project details

Download files

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

Files for django-custom-anonymous, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size django-custom-anonymous-0.3.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page