Skip to main content

Quick start

Add to INSTALLED_APPS setting

INSTALLED_APPS = (
    # ...
    'custom_user',
    'custom_user_profiles
)

Set AUTH_USER_MODEL setting

AUTH_USER_MODEL = 'custom_user_profiles.CustomUser'

the CustomUser inherit from AbstractEmailUser model from [django-custom-user](https://github.com/jcugat/django-custom-user)

If you want to create your own custom user, extend custom_user_profiles.models.AbstractCustomUser.

from custom_user_profiles.models import AbstractCustomUser

class CustomUser(AbstractCustomUser):
    # ...

Create your profile models

from custom_user_profiles.models import Profile

class Buyer(Profile):
    # ...

class Seller(Profile):
    # ...

Usage

@login_required
def view(request):
    profile = request.user.profile
    if request.user.is_seller:
        # ...

Also AbstractCustomUser provides a chainable QuerySet manager:

from django.contrib.auth import get_user_model
User = get_user_model()

User.queryset.seller() # get all users with 'seller' profile
User.queryset.buyer() # get all users with 'buyer' profile
User.queryset.something() # raises django.core.exceptions.FieldError
objects manager is still available and inherit from django’s BaseUserManager

Metadata

Release files for custom-user-profiles 1.2.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 custom-user-profiles 1.2.0
File Size Uploaded Provenance Actions
custom-user-profiles-1.2.0.tar.gz 1.8 kB Without provenance Details for custom-user-profiles-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for custom-user-profiles 1.2.0
File Interpreter ABI Platform Actions
custom_user_profiles-1.2.0-py2-none-any.whl Python 2 none any Details for custom_user_profiles-1.2.0-py2-none-any.whl

Total release size: 5.3 kB

Release files / custom-user-profiles-1.2.0.tar.gz

Download URL custom-user-profiles-1.2.0.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ac015cfa20d97218fbf5a87995463b1dba8986dff287e343ceee728fe79e6f29
BLAKE2b-256 checksum
How to use checksums
5d90bb1a80a869c5d80ea59ab1e883b979fd83e10a1c797d603f081c90a2f907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / custom_user_profiles-1.2.0-py2-none-any.whl

Download URL custom_user_profiles-1.2.0-py2-none-any.whl
Size 3.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
c0047586e066fd821041b115e6a775f9ee1b32348544736b88e6c32c3893eff4
BLAKE2b-256 checksum
How to use checksums
b99604e01119604f04aca9d5b2f2eae52d21d6bb0dc93cd1c92fc22c215101ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for custom-user-profiles 1.2.0

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.

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