From 5b083b817ec3a54d73832dc10b188c926c0f4fd9 Mon Sep 17 00:00:00 2001 From: Samantha Atkins Date: Mon, 29 Sep 2014 19:48:49 -0700 Subject: [PATCH] changes to support custom user --- invitation/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invitation/models.py b/invitation/models.py index 4404420..a0a71ae 100755 --- a/invitation/models.py +++ b/invitation/models.py @@ -3,7 +3,7 @@ import hashlib from django.conf import settings -from django.contrib.auth.models import User, Group +from django.contrib.auth.models import Group from django.contrib.sites.models import Site from django.core.mail import send_mail from django.db import models @@ -58,8 +58,8 @@ class Invitation(models.Model): date_invited = models.DateTimeField(_('date invited')) expiration_date = models.DateTimeField() used = models.BooleanField(default=False) - from_user = models.ForeignKey(User, related_name='invitations_sent') - to_user = models.ForeignKey(User, null=True, blank=True, related_name='invitation_received') + from_user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='invitations_sent') + to_user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, related_name='invitation_received') email = models.EmailField(unique=True) objects = InvitationManager()