Exemple #1
0
 def exit(
     self
 ):  #Needs fixing. Doesn't actually get current schema. Possibly do the same as Site framework
     if hasattr(self, '_schema_temp'):
         if getattr(settings, 'APPSCHEMA_RESET_PATH', True):
             schema_store.set_schema(schema=self._schema_temp)
             if settings.DEBUG:
                 print '\n ** Restoring database to schema "%s" **' % (
                     self._schema_temp or 'public', )
         del self._schema_temp
Exemple #2
0
 def enter(self):
     self._schema_temp = schema_store.current_schema()
     schema_store.set_schema(schema=self.name, force=True)
     if settings.DEBUG:
         print ' ** Using database with schema "%s" **' % self
Exemple #3
0
 def exit(self):     #Needs fixing. Doesn't actually get current schema. Possibly do the same as Site framework
     if hasattr(self, '_schema_temp'):
         if getattr(settings, 'APPSCHEMA_RESET_PATH', True):
             schema_store.set_schema(schema=self._schema_temp)
             if settings.DEBUG: print '\n ** Restoring database to schema "%s" **' % (self._schema_temp or 'public', )
         del self._schema_temp
Exemple #4
0
 def enter(self):
     self._schema_temp = schema_store.current_schema()
     schema_store.set_schema(schema=self.name, force=True)
     if settings.DEBUG: print ' ** Using database with schema "%s" **' % self