Fixed #8660 -- Small database query optimisation in User.get_profile.
Fixed #8660 -- Small database query optimisation in User.get_profile.

When calling User.get_profile(), we now tell the profile object about the
related User object right away. This can save a database lookup later if
something in the user profile object wants to refer to the user object.

Patch from Mike Malone.

--HG--
extra : convert_revision : svn%3Abcc190cf-cafb-0310-a4f2-bffc1f526a37/django/trunk%409152

adieu/django-nonrel,adieu/django-nonrel,adieu/django-nonrel