Exemplo n.º 1
0
def admin_user_list(request):
    selected = [
        int(tag_id) for tag_id in request.GET.getlist('tags')
    ]

    results = User.objects.all()
    if selected:
        results = results.filter(tags__in=selected)

    return render(request, 'admin/admin_user_list.html', {
        'results': paginate(request.GET, results),
        'tags': Tag.objects.all(),
        'selected': selected
    })
Exemplo n.º 2
0
def admin_circle_list(request):
    object_list = MisionMember.objects.filter(is_lead=True)
    return render(request, 'admin/admin_circle_list.html', {
        'results': paginate(request.GET, object_list)
    })
Exemplo n.º 3
0
def admin_shopping_cycle_list(request):
    return render(request, 'admin/admin_shopping_cycle_list.html', {
        'results': paginate(request.GET, ShoppingCycle.objects.all()),
    })
Exemplo n.º 4
0
def admin_supplier_list(request):
    return render(request, 'admin/admin_supplier_list.html', {
        'results': paginate(request.GET, Supplier.objects.select_related())
    })
Exemplo n.º 5
0
def admin_product_list(request):
    return render(request, 'admin/admin_product_list.html', {
        'results': paginate(request.GET, Product.objects.all())
    })
Exemplo n.º 6
0
def admin_tag_list(request):
    return render(request, 'admin/admin_tag_list.html', {
        'results': paginate(request.GET, Tag.objects.all())
    })
Exemplo n.º 7
0
def product_list(request):
    return render(request, 'mision/product_list.html', {
        'results': paginate(request.GET, Product.objects.all()),
    })