Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update import for GenericRelation #9

Merged
merged 1 commit into from Sep 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Expand Up @@ -72,10 +72,10 @@ Add generic relation
Let's assume that you have a ``UserProfile`` model and you want to add an
``avatar`` field to that model.

First you might want to add a ``GenericRelation`` to your ``UserProfile``
First you might want to add a [``GenericRelation``](https://docs.djangoproject.com/en/1.8/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericRelation) to your ``UserProfile``
model::

from django.contrib.contenttypes import generic
from django.contrib.contenttypes import fields


class UserProfile(models.Model):
Expand All @@ -84,7 +84,7 @@ model::
getattr(settings, 'AUTH_USER_MODEL', 'auth.User'),
)

avatar = generic.GenericRelation(
avatar = fields.GenericRelation(
'user_media.UserMediaImage',
)

Expand Down