I'm trying to create an app where a person can login, do stuff, and see their personal information like their first_name, last_name, email, username, etc. So far I have the application displaying their username and email, but not first_name or last_name.
If I go on the admin site and I look under "Users", it only displays the username and email of the user, but not the first_name or last_name. So that's most likely the problem, but I don't know how to get this information to "save."
Here's my "Student" model:
class Student(models.Model):
user = models.OneToOneField(User)
first_name = models.CharField(max_length=200, null=True)
last_name = models.CharField(max_length=200, null=True)
email = models.CharField(max_length=200, null=True)
EDIT: I created a student admin with all that information. Here's what it looks like:
class StudentAdmin(admin.ModelAdmin):
list_display = ('username', 'email', 'first_name', 'last_name')
inlines = StudentInline
If I manually add the first and last name of the user, it works perfectly. But it's not adding them even after this change.