Skip to main content

Small app that extends default Django user to have case-insensitive username.

Project description

django-case-insensitive-user

Small app that extends default Django user to have case-insensitive username.

Requirements

  • Python 3.8 or later
  • Django 4.2 or later

Installation

  1. Install django-case-insensitive-user using pip.
pip install requirements.txt
  1. Add case_insensitive_user to INSTALLED_APPS list in settings.
INSTALLED_APPS = [
    ...
    "case_insensitive_user",
]
  1. Set AUTH_USER_MODEL to case_insensitive_user.User in settings.
AUTH_USER_MODEL = "case_insensitive_user.User"

Overriding default user model

If you want to add additional fields to the user model, you can do so by creating a new model that inherits from case_insensitive_user.User and adding additional fields to it. Then, set AUTH_USER_MODEL to the new model in settings.

from django.db import models

from case_insensitive_user.models import User

class CustomUser(User):
    custom_field = models.CharField(max_length=100)

Make sure to set AUTH_USER_MODEL to the new model in settings.

AUTH_USER_MODEL = "your_app.CustomUser"

Features

  • Works out of the box in Django admin panel
  • 100% test coverage

Configuration

Configuration is done using CASE_INSENSITIVE_USER optional dictionary in your settings file:

CASE_INSENSITIVE_USER = {
    "VERBOSE_NAME": "Accounts",  # Display name to display in admin page for this app
    "CASE_INSENSITIVE_EMAIL": True,  # Whether to make emails case-insensitive too, False by default
}

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_case_insensitive_user-0.2.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_case_insensitive_user-0.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file django_case_insensitive_user-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django_case_insensitive_user-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0ebead77ee5dc7d2809a4b3b6c3fce1062807bb1f5817e32bc511236c37e3123
MD5 9927ff54fe0d67274efd94172c7c5304
BLAKE2b-256 d84472a0b93d978d147b8e8cc9e497ed720d266f6fa4e17b3096f4dd4a90621d

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_case_insensitive_user-0.2.1.tar.gz:

Publisher: publish_package.yml on alenzeinolov/django-case-insensitive-user

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_case_insensitive_user-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_case_insensitive_user-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6cc3209b024ad04f8c5fac74bc5a0368c96cdfae5e315a5beb01173954f1712
MD5 9699f608030a59de954eb4de1c59f791
BLAKE2b-256 d5dc1d93467c646ae2dae81628ab18083bc1fb63f1e03b9e073dd16b549c3a1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_case_insensitive_user-0.2.1-py3-none-any.whl:

Publisher: publish_package.yml on alenzeinolov/django-case-insensitive-user

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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