Mercurial > public > sg101
diff gpp/bio/models.py @ 259:75ea1a8be7f2
Fix some old import problems where I used 'from django.contrib import auth' instead of 'from django.contrib.auth.models import User'. Also some formatting changes while I was in there.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 21 Sep 2010 23:49:05 +0000 |
parents | cd4124b19196 |
children | d424b8bae71d |
line wrap: on
line diff
--- a/gpp/bio/models.py Tue Sep 21 23:08:36 2010 +0000 +++ b/gpp/bio/models.py Tue Sep 21 23:49:05 2010 +0000 @@ -6,7 +6,7 @@ import os.path from django.db import models -from django.contrib import auth +from django.contrib.auth.models import User from django.conf import settings from django.core.cache import cache @@ -70,7 +70,7 @@ class UserProfile(models.Model): """model to represent additional information about users""" - user = models.ForeignKey(auth.models.User, unique=True) + user = models.ForeignKey(User, unique=True) location = models.CharField(max_length=128, blank=True) birthday = models.DateField(blank=True, null=True, help_text='Optional; the year is not shown to others') @@ -140,7 +140,7 @@ class UserProfileFlag(models.Model): """This model represents a user flagging a profile as inappropriate.""" - user = models.ForeignKey(auth.models.User) + user = models.ForeignKey(User) profile = models.ForeignKey(UserProfile) flag_date = models.DateTimeField(auto_now_add=True)