Exemplo n.º 1
0
def admin_products_kind_add(request):
    data = json.loads(request.body)
    type_ = data['type']
    kind_zh = data['kind']
    adminEditManager.add_products_kind(type_, kind_zh)
    return HttpResponse(responseDataManager.admin_data(),
                        content_type="application/json")
Exemplo n.º 2
0
def admin_list_top(request):
    data = json.loads(request.body)
    type_ = data['type']
    kind = data['kind']
    index = data['index']
    adminEditManager.list_top(type_, kind, index)
    return HttpResponse(responseDataManager.admin_data(),
                        content_type="application/json")
Exemplo n.º 3
0
def get_data(request, kind):
    if kind == 'frame':
        return HttpResponse(responseDataManager.frame_data(),
                            content_type="application/json")
    elif kind == 'base_info':
        return HttpResponse(responseDataManager.base_info(),
                            content_type="application/json")
    elif kind == 'admin':
        return HttpResponse(responseDataManager.admin_data(),
                            content_type="application/json")
    elif kind == 'home':
        return HttpResponse(responseDataManager.home_data(),
                            content_type='application/json')
    elif kind == 'collect':
        return HttpResponse(responseDataManager.user_collect_data(request),
                            content_type="application/json")
    else:
        return HttpResponse(responseDataManager.user_data(),
                            content_type="application/json")
Exemplo n.º 4
0
def admin_products_type_delete(request):
    data = json.loads(request.body)
    type_ = data['type']
    adminEditManager.delete_products_type(type_)
    return HttpResponse(responseDataManager.admin_data(),
                        content_type="application/json")