server/python/django/renkanmanager/models.py
changeset 387 87555646dd07
parent 318 815589aed866
--- a/server/python/django/renkanmanager/models.py	Thu Feb 19 13:06:46 2015 +0100
+++ b/server/python/django/renkanmanager/models.py	Thu Feb 26 10:33:57 2015 +0100
@@ -5,13 +5,13 @@
 '''
 from django.conf import settings
 from django.db import models
-from hdabo.models import User
 from easy_thumbnails.fields import ThumbnailerImageField
 
+auth_user_model = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
 
 class Renkan(models.Model):
     
-    owner = models.ForeignKey(User, blank=True, null=True)
+    owner = models.ForeignKey(auth_user_model, blank=True, null=True)
     rk_id = models.CharField(max_length=1024, unique=True, blank=False, null=False) # typically UUID
     content = models.TextField(blank=True, null=True)
     title = models.CharField(max_length=1024, null=True)