Example #1
0
def get_all():
    df = crud.all()
    return df.to_json(orient='records')
Example #2
0
def incomes_by_user():
    try:
        return crud.all("income")
    except:
        return response_error()
Example #3
0
def list_entity(resource):

    resource_class = get_resource_class(resource)
    return response_success(params={"data":crud.all(resource_class, request=request)})
Example #4
0
def expenses_by_tag(tag):
    try:
        tag_id = Tag.get(name=tag)['_id']
        return response_success(params={'data':crud.all("expense", tag_id=tag_id)})
    except:
        return response_error()