Hi,

I have the following model that i use as AUTH_USER_MODEL :

model.py


class User(AbstractBaseUser, PermissionsMixin):
   email = models.EmailField(_('email address'), unique=True)
   password = models.CharField(_('password'), max_length=255, blank=False)
   first_name = models.CharField(_('first name'), max_length=30, blank=True)
   last_name = models.CharField(_('last name'), max_length=30, blank=True)
   date_joined = models.DateTimeField(_('date joined'), auto_now_add=True)
   is_active = models.BooleanField(_('active'), default=True)
   is_staff = models.BooleanField(_('staff status'), default=False)
   avatar = models.CharField(_('avatar'), max_length=30, blank=True, null=
True) 
    #models.ImageField(upload_to='avatars/', null=True, blank=True)

    objects = UserManager()

    USERNAME_FIELD = 'email'
   REQUIRED_FIELDS = []

    class Meta:
       verbose_name = _('user')
       verbose_name_plural = _('users')

settings.py
AUTH_USER_MODEL = 'user.User'


When i want to create a superuser and enter the email of the user i want to 
create :
python manage.py createsuperuser


I get the following error : 
django.db.utils.OperationalError: no such table: user_user

Someone knows why I get this error?

Thank you for you help

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/727d62a0-836b-447b-b156-663985a40e6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to