Ticket #9987: auth-docs--add-profile-by-signal.diff

File auth-docs--add-profile-by-signal.diff, 778 bytes (added by Thomas Güttler, 16 years ago)
  • docs/topics/auth.txt

     
    452452-- which returns the instance of the user profile model associated
    453453with that :class:`~django.contrib.auth.models.User`.
    454454
     455The method :class:`~django.contrib.auth.models.User.get_profile()`
     456does not create the profile, if it does not exist. You need to
     457register a handler for the signal
     458:attr:`django.db.models.signals.post_save` on the User model, and, in
     459the handler, if created=True, create the associated user profile.
     460
    455461For more information, see `Chapter 12 of the Django book`_.
    456462
    457463.. _Chapter 12 of the Django book: http://www.djangobook.com/en/1.0/chapter12/#cn222
Back to Top