Ticket #9987: auth-docs--add-profile-by-signal.diff
File auth-docs--add-profile-by-signal.diff, 778 bytes (added by , 16 years ago) |
---|
-
docs/topics/auth.txt
452 452 -- which returns the instance of the user profile model associated 453 453 with that :class:`~django.contrib.auth.models.User`. 454 454 455 The method :class:`~django.contrib.auth.models.User.get_profile()` 456 does not create the profile, if it does not exist. You need to 457 register a handler for the signal 458 :attr:`django.db.models.signals.post_save` on the User model, and, in 459 the handler, if created=True, create the associated user profile. 460 455 461 For more information, see `Chapter 12 of the Django book`_. 456 462 457 463 .. _Chapter 12 of the Django book: http://www.djangobook.com/en/1.0/chapter12/#cn222