I have a custom User
model in Django 1.6:
from django.contrib.auth import models as usermodels
class User(usermodels.User):
sid = models.CharField(max_length=20, unique=True)
slug = models.SlugField(default="slug")
objects = usermodels.UserManager()
In one of my templates, I have the following:
Welcome, {{ user.username }}: {{ user.sid }}
If the user is authenticated, this just displays as, for example, "Chris:" if the username is Chris. The custom field sid
isn't shown! I've checked my tables and the user does have an sid
stored. It seems that the template isn't getting my custom fields!
I've added my custom model as CUSTOM_USER_MODEL
to my settings.