Update authenthication code to support multitenants. Replace all remaining instances of hardcoded User model.

This commit is contained in:
Roberto Rosario
2016-03-07 03:08:11 -04:00
parent 6492908c59
commit 8a5a26c0b4
13 changed files with 124 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ from __future__ import unicode_literals
import logging
from django.contrib.auth.models import User
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import IntegrityError, models
from django.utils.encoding import python_2_unicode_compatible
@@ -186,7 +186,7 @@ class WorkflowInstanceLogEntry(models.Model):
transition = models.ForeignKey(
WorkflowTransition, verbose_name=_('Transition')
)
user = models.ForeignKey(User, verbose_name=_('User'))
user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('User'))
comment = models.TextField(blank=True, verbose_name=_('Comment'))
def __str__(self):