Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
User model to flutter example
from django.db import models
# Create your models here.
from django.contrib.auth.models import AbstractUser
class CustomUser(AbstractUser):
EMAIL_FIELD = 'email'
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']
username= models.CharField(blank=True, max_length=254,)
email = models.EmailField(blank=False, max_length=254, unique=True, verbose_name="email address")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.