Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 CustomUser

user = 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 CustomUser

superuser = NewUser.objects.create_superuser(
email='[email protected]',
username='your_superuser_username',
first_name='your_first',
password='your_superuser_password'
)
```