Commits

Evan Culver  committed e304d0e

Point to settings.AUTH_USER_MODEL instead of 'auth.User' in model relations to support custom user models introduced in Django 1.5.

  • Participants
  • Parent commits dd789c7

Comments (0)

Files changed (2)

File admin_tools/dashboard/models.py

 """
 This module contains the base classes for the dashboard and dashboard modules.
 """
+from django.conf import settings
 from django.db import models
 
 class DashboardPreferences(models.Model):
     """
     This model represents the dashboard preferences for a user.
     """
-    user = models.ForeignKey('auth.User')
+    user = models.ForeignKey(settings.AUTH_USER_MODEL)
     data = models.TextField()
     dashboard_id = models.CharField(max_length=100)
 

File admin_tools/menu/models.py

 """
 This module contains the base classes for menu and menu items.
 """
+from django.conf import settings
 from django.db import models
 
 class Bookmark(models.Model):
     """
     This model represents a user created bookmark.
     """
-    user = models.ForeignKey('auth.User')
+    user = models.ForeignKey(settings.AUTH_USER_MODEL)
     url = models.CharField(max_length=255)
     title = models.CharField(max_length=255)