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
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
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