Commits

Alexander Solovyov committed a630cc4

remove last mentions of env.sqla

  • Participants
  • Parent commits f6337ce

Comments (0)

Files changed (2)

svarga/contrib/dberrorlog/middleware.py

 import hashlib
 import datetime
 
-from svarga.core.env import env
+from svarga import env, db
 from svarga.shortcuts import render_to_response
 from svarga.utils.middleware import Middleware
 
         err.times_seen += 1
         err.last_seen = datetime.datetime.now()
 
-        env.sqla.session.commit()
+        db.commit()
 
         if self.exception_template:
             r = render_to_response(self.exception_template, {

svarga/contrib/sessions/backends/db.py

         obj.expire_date = self.get_expiry_date()
 
         # Dump any pending items
-        env.sqla.session.commit()
+        db.commit()
 
         # Try to save
         try:
             Session.query.add(obj)
-            env.sqla.session.commit()
+            db.commit()
         except Session.IntegrityError:
             raise CreateError()