Ticket #17750: 0001-Documentation-for-API-change-on-User.get_profile.patch

File 0001-Documentation-for-API-change-on-User.get_profile.patch, 1.5 KB (added by Renato Alves, 12 years ago)
  • docs/topics/auth.txt

    From 742427f4bcd70eece203b18c2ee6ba2ece9ffa52 Mon Sep 17 00:00:00 2001
    From: Renato Alves <rjalves@igc.gulbenkian.pt>
    Date: Fri, 24 Feb 2012 07:06:05 +0000
    Subject: [PATCH] Documentation for API change on User.get_profile()
    
    ---
     docs/topics/auth.txt |    6 +++++-
     1 files changed, 5 insertions(+), 1 deletions(-)
    
    diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
    index 3b6ad1b..2e5d904 100644
    a b Methods  
    258258        :attr:`~django.contrib.auth.models.User.from_email` is ``None``, Django
    259259        uses the :setting:`DEFAULT_FROM_EMAIL`.
    260260
    261     .. method:: models.User.get_profile()
     261    .. method:: models.User.get_profile(cached=True)
    262262
    263263        Returns a site-specific profile for this user. Raises
    264264        :exc:`django.contrib.auth.models.SiteProfileNotAvailable` if the
    Methods  
    266266        :exc:`django.core.exceptions.ObjectDoesNotExist` if the user does not
    267267        have a profile. For information on how to define a site-specific user
    268268        profile, see the section on `storing additional user information`_ below.
     269        By default it caches the result to prevent hitting the database
     270        multiple times, however if the data is changed after calling it the
     271        first time, subsequent calls will return the original object before
     272        changes. To force hitting the database again simply pass cached=False.
    269273
    270274.. _storing additional user information: #storing-additional-information-about-users
    271275
Back to Top