This release is a pre-release and may not be stable for production use.
django-mz-users
The user model and user management for Django projects of the django-mz family (projects whose admin drives an API and a Vue frontend). It is a small, plain Django app that any project can use.
Status: alpha (0.1.0a2). The API may change before 1.0.
Why a custom user model from the start
Django recommends a custom user model for every new project: switching AUTH_USER_MODEL later, on a live
database, is hard. mz_users.User is Django's standard user (AbstractUser) in its own app, so projects can share
it and extend it later without that switch.
Installation
pip install django-mz-users
INSTALLED_APPS = [..., 'django.contrib.auth', 'mz_users', ...]
AUTH_USER_MODEL = 'mz_users.User'
Set it before the first migrate of the project. The app label is mz_users (table mz_users_user).
What is included
-
mz_users.User– the user model (AbstractUser), Czech labels included -
admin registration with Django's
UserAdmin: the new-user form asks for the password twice -
optional integration with django-allauth (
mz_users.accounts), see below
Self-registration, e-mail verification, password reset and social login are django-allauth's job (its headless API works with this model as is).
With django-allauth
pip install django-mz-users[allauth]
With mandatory e-mail verification (ACCOUNT_EMAIL_VERIFICATION = 'mandatory') allauth lets in only users with a
verified e-mail. Users created outside allauth (the admin, createsuperuser, commands, scripts) are trusted: with
the adapters below their e-mail becomes a verified primary address whenever they are saved. Sign-ups and provider
logins still verify their address through allauth.
ACCOUNT_ADAPTER = 'mz_users.accounts.AccountAdapter'
SOCIALACCOUNT_ADAPTER = 'mz_users.accounts.SocialAccountAdapter' # with allauth.socialaccount
The adapters mark the users allauth creates; without them nothing is verified automatically (that would let sign-ups skip verification). Subclass them for your own adapters. A project that adopts allauth with existing users verifies their e-mails once:
python manage.py mz_users_verify_emails
Development
uv run --package django-mz-users pytest
License
MIT
Metadata
Release files for django-mz-users 0.1.0a2
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 | Actions |
|---|---|---|---|---|
| django_mz_users-0.1.0a2.tar.gz | 6.4 kB | Without provenance | Details for django_mz_users-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_mz_users-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for django_mz_users-0.1.0a2-py3-none-any.whl |
Total release size: 17.1 kB
Release files / django_mz_users-0.1.0a2.tar.gz
| Download URL | django_mz_users-0.1.0a2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a68b4c166edd62fa3c215a8d87d017263bc9f32cf1dabca6f80cbbc03d164713
|
|
BLAKE2b-256 checksum How to use checksums |
865e85a321064c510aa64537139011bf62117521633a7ac30002858192e77159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_mz_users-0.1.0a2-py3-none-any.whl
| Download URL | django_mz_users-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df8f23de11172fa50d65ffd9a05ea8d908b45d2a27ee11f26b61075c86cb051b
|
|
BLAKE2b-256 checksum How to use checksums |
9da6109c4027ec7abf3ea8692346cb2c4cb497879451a4d7a33330c2e56193a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":null,"id":"forky","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for django-mz-users 0.1.0a2
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.