Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/judevector/django_custom_model
This is a Django Custom User Model for creating users and superuser in an application
https://github.com/judevector/django_custom_model
django django-orm django-rest-framework model python
Last synced: about 2 months ago
JSON representation
This is a Django Custom User Model for creating users and superuser in an application
- Host: GitHub
- URL: https://github.com/judevector/django_custom_model
- Owner: judeVector
- Created: 2024-09-11T13:28:16.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-11T16:50:34.000Z (4 months ago)
- Last Synced: 2024-10-20T08:01:57.526Z (3 months ago)
- Topics: django, django-orm, django-rest-framework, model, python
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Django Custom User Model
This project provides a customizable Django user model, allowing you to create users and superusers with specific fields and permissions tailored to your application's requirements.
## Example Usages
### Create User
```python
from django.contrib.auth.models import User
from your_app.models import CustomUseruser = NewUser.objects.create_user(
email='[email protected]',
username='your_username',
first_name='your_first',
password='your_password'
)
```### Create superuser
```python
from django.contrib.auth.models import User
from your_app.models import CustomUsersuperuser = NewUser.objects.create_superuser(
email='[email protected]',
username='your_superuser_username',
first_name='your_first',
password='your_superuser_password'
)
```