﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16207	UserProfile documentation (not extensive enough)	Cal Leeming	Stephen Burrows	"https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users#

{{{The method get_profile() does not create the profile, if it does not exist. You need to register a handler for the signal django.db.models.signals.post_save on the User model, and, in the handler, if created=True, create the associated user profile.}}}

However, it does not show how to do this. For new users, this will be quite off putting, especially as most people skim the documentation, and don't bother with the 'fat'.

May I suggest the documentation is included to use the following snippet:
http://stackoverflow.com/questions/44109/extending-the-user-model-with-custom-fields-in-django

{{{
#in models.py
from django.contrib.auth.models import User
from django.db.models.signals import post_save

class UserProfile(models.Model):  
    user = models.OneToOneField(User)  
    #other fields here

    def __str__(self):  
          return ""%s's profile"" % self.user  

def create_user_profile(sender, instance, created, **kwargs):  
    if created:  
       profile, created = UserProfile.objects.get_or_create(user=instance)  

post_save.connect(create_user_profile, sender=User) 

#in settings.py
AUTH_PROFILE_MODULE = 'YOURAPP.UserProfile'
}}}
"	Bug	closed	Documentation	1.3	Normal	fixed	userprofile		Ready for checkin	1	0	0	0	0	0
