예제 #1
0
파일: value.py 프로젝트: gmist/1businka
def is_value_exist(title, property_key):
    value = ProductPropertyValue.query()\
    .filter(ProductPropertyValue.property == property_key)\
    .filter(ProductPropertyValue.title == title)
    if value.count():
        return True
    return False
예제 #2
0
def get_values(request, property_key):
    property_obj = ProductProperty.get_by_id(property_key)
    values = ProductPropertyValue.query( ProductPropertyValue.property == property_obj.key )
    values = [value.to_json() for value in values]
    return render_json_response(values)