How I create new Users:
from twittexApp.forms import UserCreationForm from django.views.generic import CreateView from twittexApp.models import RegUser, User class RegisterView(CreateView): template_name = 'register.html' model = RegUser success_url = '/login/' form_class = UserCreationForm My extended User Model:
from django.db import models from django.contrib.auth.models import User class RegUser(models.Model): user = models.OneToOneField(User) description = models.CharField(max_length = 140, default="foo") My question is how do I get the attribute "description" from an user?
I already know that I can get the "standard" user model via
<h1>My Profile</h1> <ul> <div>{{ request.user.username }}</div> </ul> But getting the description doesnt work. I tried 2 different versions but it doesnt show "foo".
<h1>My Profile</h1> <ul> <div>{{ request.user.desciption }}</div> <div>{{ request.user.reguser.desciption }}</div> </ul>