PEATDB/PEATTables.py
def update_columnNames(self):
        """Update the columns from userfields when data has been changed
           externally"""
        self.userfields = self.meta.userfields
        currentkeys = self.userfields.keys()
        currentkeys.extend(self.meta.staticfields.keys())
        #add any keys not present in new userfields
        for key in self.userfields:            
            if not key in self.columnNames:
                self.columnNames.append(key)
                self.columnlabels[key]=key                
                self.columntypes[key]=self.userfields[key]['field_type']
            if self.userfields[key]['show'] == False:
                self.columnNames.remove(key)                
        #remove keys if not in userfields anymore
        for key in self.columnNames:    
            if not key in currentkeys:
                self.columnNames.remove(key)
                del self.columnlabels[key]
                del self.columntypes[key]
        return
Update the columns from userfields when data has been changed
           externally
Update the columns from userfields when data has been changed
externally
Update the columns from userfields when data has been changed externally
def update_columnNames(self):
        self.userfields = self.meta.userfields
        currentkeys = self.userfields.keys()
        currentkeys.extend(self.meta.staticfields.keys())
        for key in self.userfields:            
            if not key in self.columnNames:
                self.columnNames.append(key)
                self.columnlabels[key]=key                
                self.columntypes[key]=self.userfields[key]['field_type']
            if self.userfields[key]['show'] == False:
                self.columnNames.remove(key)                
        for key in self.columnNames:    
            if not key in currentkeys:
                self.columnNames.remove(key)
                del self.columnlabels[key]
                del self.columntypes[key]
        return
def update_columnNames ( self ) : self . userfields = self . meta . userfields currentkeys = self . userfields . keys ( ) currentkeys . extend ( self . meta . staticfields . keys ( ) ) for key in self . userfields : if not key in self . columnNames : self . columnNames . append ( key ) self . columnlabels [ key ] = key self . columntypes [ key ] = self . userfields [ key ] [ 'field_type' ] if self . userfields [ key ] [ 'show' ] == False : self . columnNames . remove ( key ) for key in self . columnNames : if not key in currentkeys : self . columnNames . remove ( key ) del self . columnlabels [ key ] del self . columntypes [ key ] return
Update the columns from userfields when data has been changed
externally
Update the columns from userfields when data has been changed externally
"""Update the columns from userfields when data has been changed
           externally""" #add any keys not present in new userfields #remove keys if not in userfields anymore
self