Create custom-user profiles easily
Project description
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: ...
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
Built Distribution
Close
Hashes for custom-user-profiles-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f18ac73f4f9945a60ef072551dc5c9dcd8442ff665d74c3fa5e14ab20909857 |
|
MD5 | 1ec516f263b79207b8369a98aabc9210 |
|
BLAKE2b-256 | bcc7ee24eb0cc8c3c537f738c4c8596026f1948446928eef639ac8173024960e |
Close
Hashes for custom_user_profiles-1.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4954bab50139b8c66db117db3895cef2642a2424d109c1d882bd4058f20d8cc5 |
|
MD5 | e025140efb15f4305fde94bcd8bc5caa |
|
BLAKE2b-256 | 1e049ef48122a078a2b69f5cc557a1f651577363872a967194a4e5bf96f8b459 |