Commits

Anonymous committed 41150ab

Fixed potential circular import problem.

  • Participants
  • Parent commits d57e25e

Comments (0)

Files changed (2)

File django/contrib/sessions/backends/db.py

 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.
             Session.objects.get(session_key=session_key).delete()
         except Session.DoesNotExist:
             pass
+
+
+# At bottom to avoid circular import
+from django.contrib.sessions.models import Session

File django/contrib/sessions/models.py

 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