I'm trying to create a custom auth_users
table with Django 1.5 following the intructions here:
https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#auth-custom-user
But the code below doesn't seem to be working even though I have set the new columns it should contain.
It still creates the same default table even after dropping the full database and python manage.py syncdb
I have read several documents and that is what I have right now:
models.py
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
class User(AbstractBaseUser):
identifier = models.EmailField(max_length=254)
first_name = models.CharField(max_length=254)
last_name = models.CharField(max_length=254)
USERNAME_FIELD = 'identifier'
REQUIRED_FIELDS = ['first_name','last_name']
This models.py
is installed in settings.py
settings.py
AUTH_PROFILE_MODEL = 'myaccount.User'
This doesn't make any effect to the table, but it creates a new one called myaccount_user.
What's wrong with that? What should I change in order to modify auth_user
table instead of creating a new one?