Ejemplo n.º 1
0
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        result.append((class_name, len(dingos_class_map[class_name].objects.all())))
    return result
Ejemplo n.º 2
0
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        result.append(
            (class_name, len(dingos_class_map[class_name].objects.all())))
    return result
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        #print "Class %s" % class_name
        objects_in_db = dingos_class_map[class_name].objects.all()
        #for o in objects_in_db:
        #    print o
        result.append((class_name, objects_in_db.count()))
    return result
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        #print "Class %s" % class_name
        objects_in_db = dingos_class_map[class_name].objects.all()
        #for o in objects_in_db:
        #    print o
        result.append((class_name, objects_in_db.count()))
    return result
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        result.append((class_name, len(dingos_class_map[class_name].objects.all())))

    #datatypes = DataTypeNameSpace.objects.all()

    #print "Datatypes"
    #for dtype in datatypes:
    #    print dtype.uri

    return result
def object_counter():
    """
    Returns a tuple that contains counts of how many objects of each model
    defined in dingos.models are in the database.
    """
    class_names = dingos_class_map.keys()
    class_names.sort()
    result = []
    for class_name in class_names:
        result.append(
            (class_name, len(dingos_class_map[class_name].objects.all())))

    #datatypes = DataTypeNameSpace.objects.all()

    #print "Datatypes"
    #for dtype in datatypes:
    #    print dtype.uri

    return result