from django.db import models
from django.utils.text import slugify
from django.contrib.auth.models import AbstractUser
from authentication.constants import *


class User(AbstractUser):
    email = models.EmailField(
        unique=True,
        error_messages={'unique': USER_EMAIL_CONSTRAINT_MESSAGE}
    )
    image = models.TextField(null=True, blank=True, default=DEFAULT_USER_IMAGE) # Image is saved as base64 string

    def __str__(self):
        return f'{self.email}, {self.username}'

15247fa7098d9c1aa9b9217d7b400c78faef25e0
<mask token>

<mask token>


class User(AbstractUser):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class User(AbstractUser):
    email = models.EmailField(unique=True, error_messages={'unique':
        USER_EMAIL_CONSTRAINT_MESSAGE})
    image = models.TextField(null=True, blank=True, default=DEFAULT_USER_IMAGE)

    def __str__(self):
        return f'{self.email}, {self.username}'

from django.db import models
from django.utils.text import slugify
from django.contrib.auth.models import AbstractUser
from authentication.constants import *


class User(AbstractUser):
    email = models.EmailField(unique=True, error_messages={'unique':
        USER_EMAIL_CONSTRAINT_MESSAGE})
    image = models.TextField(null=True, blank=True, default=DEFAULT_USER_IMAGE)

    def __str__(self):
        return f'{self.email}, {self.username}'

from django.db import models
from django.utils.text import slugify
from django.contrib.auth.models import AbstractUser
from authentication.constants import *


class User(AbstractUser):
    email = models.EmailField(
        unique=True,
        error_messages={'unique': USER_EMAIL_CONSTRAINT_MESSAGE}
    )
    image = models.TextField(null=True, blank=True, default=DEFAULT_USER_IMAGE) # Image is saved as base64 string

    def __str__(self):
        return f'{self.email}, {self.username}'
