luke...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 41150ab

Fixed potential circular import problem.

  • Participants
  • Parent commits d57e25e
  • Branches default

Comments (0)

Files changed (2)

File django/contrib/sessions/backends/

 import datetime
 from django.conf import settings
-from django.contrib.sessions.models import Session
 from django.contrib.sessions.backends.base import SessionBase, CreateError
 from django.core.exceptions import SuspiciousOperation
 from django.db import IntegrityError, transaction, router
 from django.utils.encoding import force_unicode
 class SessionStore(SessionBase):
     Implements database session store.
         except Session.DoesNotExist:
+# At bottom to avoid circular import
+from django.contrib.sessions.models import Session

File django/contrib/sessions/

 from django.db import models
 from django.utils.translation import ugettext_lazy as _
 class SessionManager(models.Manager):
     def encode(self, session_dict):
     def get_decoded(self):
         return SessionStore().decode(self.session_data)
+# At bottom to avoid circular import
 from django.contrib.sessions.backends.db import SessionStore