def publish_rdf( **kwargs) :
    obj = kwargs['instance']
    ct = ContentType.objects.get_for_model(obj)
    oml = ObjectMapping.objects.filter(content_type=ct)
    result = publish( obj, ct.name, oml) 
    logger.debug(
            "Persisting RDF for {} of type {} status {} body {}".format(obj,ct,result.status_code,result.content))
Exemple #2
0
def publish_rdf( **kwargs) :
    obj = kwargs['instance']
    try:
        if obj.skip_post_save :
            return
    except: # false or not supported
        pass
    ct = ContentType.objects.get_for_model(obj)
    oml = ObjectMapping.objects.filter(content_type=ct)
    result = publish( obj, ct.name, oml, None) 
    logger.debug(
            "Persisting RDF for {} of type {} status {} body {}".format(obj,ct,result.status_code,result.content))
    print("Persisting RDF for {} of type {} status {} body {}".format(obj,ct,result.status_code,result.content))
def publish_rdf( **kwargs) :
    obj = kwargs['instance']
    try:
        if obj.skip_post_save :
            return
    except: # false or not supported
        pass
    ct = ContentType.objects.get_for_model(obj)
    oml = ObjectMapping.objects.filter(content_type=ct)
    result = publish( obj, ct.name, oml, None) 
    logger.debug(
            "Persisting RDF for {} of type {} status {} body {}".format(obj,ct,result.status_code,result.content))
    print            "Persisting RDF for {} of type {} status {} body {}".format(obj,ct,result.status_code,result.content)
Exemple #4
0
def do_sync_remote(formodel, ct, rdfstore):

    oml = ObjectMapping.objects.filter(content_type=ct)
    modelclass = ct.model_class()
    for obj in modelclass.objects.all():
        publish(obj, formodel, oml, rdfstore)
def do_sync_remote(formodel, ct ,rdfstore):

    oml = ObjectMapping.objects.filter(content_type=ct)
    modelclass = ct.model_class()
    for obj in modelclass.objects.all() :
        publish( obj, formodel, oml, rdfstore)