Skip to main content

django-custom-anonymous

.. figure:: https://travis-ci.org/bugov/django-custom-anonymous.svg?branch=master

Library provides customization of AnonymousUser.

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

Installation

.. code:: bash

pip install django-custom-anonymous

Customization

Add to settings:

.. code:: python

AUTH_ANONYMOUS_MODEL = 'your_app.module.CustomAnonymousUser'

Add to middlewares:

.. code:: python

MIDDLEWARE = (
...
    'custom_anonymous.middleware.AuthenticationMiddleware',
...
)

Create your own anonymous (for example):

.. code:: python

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__()

Release files for django-custom-anonymous 0.5.0

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-custom-anonymous 0.5.0
File Size Uploaded
django-custom-anonymous-0.5.0.tar.gz 2.4 kB Details

Release files / django-custom-anonymous-0.5.0.tar.gz

Download URL django-custom-anonymous-0.5.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8aeca8f07f6534be0fedb7255d1bb053e22de7380654e8a4a98604b08d57e362
BLAKE2b-256 checksum
How to use checksums
5b263ab8318be8e9d7c4928093353ab2356fec62a054117c09e56bd00cad866d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

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