(existing_config)
return config
Retrieve configuration information for ThreatGRID
Retrieve configuration information for ThreatGRID
Retrieve configuration information for ThreatGRID
def get_config(existing_config):
        """
        Retrieve configuration information for ThreatGRID
        """
        config = {}
        fields = forms.ThreatGRIDConfigForm().fields
        for name, field in fields.iteritems():
            config[name] = field.initial

        # If there is a config in the database, use values from that.
        if existing_config:
            for key, value in existing_config.iteritems():
                config[key] = value
        return config
def get_config ( existing_config ) : config = { } fields = forms . ThreatGRIDConfigForm ( ) . fields for name , field in fields . iteritems ( ) : config [ name ] = field . initial # If there is a config in the database, use values from that. if existing_config : for key , value in existing_config . iteritems ( ) : config [ key ] = value return config