Beispiel #1
0
def pages_index(request):
    if request.method == 'POST':
        form = ResultListForm(request.POST)
        if form.is_valid():
            apply_batch_action(request)
    return render_to_response(
        'daguerro/pages.html', {
            'form': ResultListForm(),
            'pages': DaguerroFlatPage.objects.all(),
            'current_action': 'pages',
            },
        context_instance=RequestContext(request))
Beispiel #2
0
def users_index(request):
    if request.method == 'POST':
        data = dict(request.POST)
        data.update(user_id = request.user.pk)
        form = ResultListForm(data)
        if form.is_valid():
            apply_batch_action(request)
    else:
        form = ResultListForm()
    return render_to_response(
        'daguerro/users.html', {
            'form': form,
            'users': User.objects.filter(is_superuser=False),
            'current_action': 'users',
            },
        context_instance=RequestContext(request))