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.2.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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_case_insensitive_user-0.2.2.tar.gz
Algorithm Hash digest
SHA256 312740c1980c774f8ce2f29bfac1d7106020c38981c024ab83f7bc82c13f7c51
MD5 701e2a07d3530a80043ae50a85554201
BLAKE2b-256 e9d9358b38852ca9e99e705fd2624458a6c555f2eb9420f2737e551be29b00bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_case_insensitive_user-0.2.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_case_insensitive_user-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 363a13b60913456e91bbfebe326c97f18508f0f472bcff37e2014a025de2a835
MD5 2714bdb83720d2a80f15427d1e6c5256
BLAKE2b-256 0373fdb299107c34186bc4d93754b29d2f3422476b56de369d610c4146852658

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_case_insensitive_user-0.2.2-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