Example #1
0
def immobiles_objects(request):
    if request.GET.has_key("q") and request.GET["q"] != "*":
        pattern = request.GET["q"]
        objects = queries.search_immobiles_objects(pattern)
    else:
        objects = queries.get_all_immobiles_objects()
    return HttpResponse(json.dumps(objects, indent=2))
Example #2
0
def immobiles_objects_search(request, pattern):
    objects = queries.search_immobiles_objects(pattern)
    return HttpResponse(json.dumps(objects, indent=2))