Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/a/u/authentic2-2.1.2/authentic2/attribute_aggregator/models.py   authentic2(Download)
 
from .mapping_loader import ATTRIBUTE_MAPPING, ATTRIBUTE_NAMESPACES
from .core import (convert_from_string,
    get_def_name_from_name_and_ns_of_attribute, iso8601_to_datetime,
    get_def_name_from_oid, get_def_name_from_alias,
        if values:
            for value in values:
                if convert_from_string(self.definition, value):
                    self.values.append(value.encode('utf-8'))
        if isinstance(source, AttributeSource):
    def get_converted_values(self):
        return [convert_from_string(self.definition, value) \
            for value in self.values]
 
    def get_source(self):
    def add_value(self, value):
        if value and convert_from_string(self.definition, value):
            try:
                self.values.append(value.encode('utf-8'))
                self.save()
 
                            values = [value for value in attribute['values'] \
                                if convert_from_string(definition, value)]
 
                            if self.add_data(AttributeData(\