Mercurial > public > pelican-blog
changeset 21:21a29f2520ca
Add related_name to UserProfile model example.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 27 Aug 2016 13:18:54 -0500 |
parents | 137650a0be4e |
children | a893739e9587 |
files | content/Coding/030-retiring-get-profile-and-auth-profile-module.rst |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/content/Coding/030-retiring-get-profile-and-auth-profile-module.rst Sat Aug 27 13:04:58 2016 -0500 +++ b/content/Coding/030-retiring-get-profile-and-auth-profile-module.rst Sat Aug 27 13:18:54 2016 -0500 @@ -84,7 +84,7 @@ class Profile(models.Model): """model to represent additional information about users""" - user = models.OneToOneField(User) + user = models.OneToOneField(User, related_name='profile') # ... other custom stuff here Update the code