Commits

Anonymous committed 1410312

use settings.AUTH_USER_MODEL

  • Participants
  • Parent commits b728b70

Comments (0)

Files changed (1)

ratings/models.py

 from django.contrib.contenttypes.models import ContentType
 from django.contrib.contenttypes import generic
 from django.utils.datastructures import SortedDict
-from django.contrib.auth.models import User
+from django.conf import settings
 
 from ratings import managers
 
     key = models.CharField(max_length=16)
     score = models.FloatField()
 
-    user = models.ForeignKey(User, blank=True, null=True, related_name='votes')
+    user = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True, related_name='votes')
     ip_address = models.IPAddressField(null=True)
     cookie = models.CharField(max_length=64, blank=True, null=True)
     created_at = models.DateTimeField(auto_now_add=True)