Django Custom Email User
Replacing the username with the email as the unique identifier is so common, that I simply decided to create a package to prevent this tedium again.
Used to replace default Django User model with email, instead of the username, as the unique identifer. The username is changed to optional and will not be requested as part of createsuperuser.
The Django admin panel is customised to accommodate these changes, along with the User forms custom_email_user.forms.CustomUserCreationForm and custom_email_user.forms.CustomUserChangeForm
Simply:
- add custom_email_user to your installed apps
- subclass the abstracted class
- configure the AUTH_USER_MODEL
- run the migrations
- register your user model with the admin site
INSTALLED_APPS = [
...
'custom_email_user'
]
AUTH_USER_MODEL = 'my_model_module.User'
from django.db import models
from custom_email_user.models import User as BaseUser
class User(BaseUser):
pass
from django.contrib import admin
from custom_email_user.admin import CustomUserAdmin
from .models import User
admin.site.register(User, CustomUserAdmin)
Metadata
Release files for django-custom-email-user 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_custom_email_user-0.1.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_custom_email_user-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / django_custom_email_user-0.1.tar.gz
| Download URL | django_custom_email_user-0.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4729c55e1819a4f86ef1fa026b841f759c51e06870ccaef9f3a56aaba7b7ee0
|
|
BLAKE2b-256 checksum How to use checksums |
6a74be76a00021edb494d72cf057cb182adcd2c0b4758bf8b0668a944fedd2d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
|
Release files / django_custom_email_user-0.1-py3-none-any.whl
| Download URL | django_custom_email_user-0.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28a64805742bb5b5463ebfc59eb3989604b6386df6f8fd762ec064ad68e6c18b
|
|
BLAKE2b-256 checksum How to use checksums |
04fbb6d1034853079fe8fb5ec2af58d2e3c1e44c7b5402d0fbb2d476d86fc22b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6
|
Security for django-custom-email-user 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.