I would like to create a User model that has an additional couple fields in django. I tried to do so by following the advice https://stackoverflow.com/a/22696794/3426600 to create a custom user model in models.py
from django.db import models
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
user_data = models.TextField(null=True)
In settings.py
AUTH_USER_MODEL = 'app_name.User'
but when I run python manage.py syncdb
I get the errors:
CommandError: One or more models did not validate: account.emailaddress: 'user' has a relation with model app_name.User, which has either not been installed or is abstract. admin.logentry: 'user' has a relation with model app_name.User, which has either not been installed or is abstract. auth.user: Model has been swapped out for 'app_name.User' which has not been installed or is abstract. socialaccount.socialaccount: 'user' has a relation with model app_name.User, which has either not been installed or is abstract.
Could I be using the wrong app_name? If so, where do I find the app_name? How do I make the custom user work with socialaccount, etc?