Exemple #1
0
def queue_moderated(request):
    """Queue for reviewing app reviews."""
    queues_helper = ReviewersQueuesHelper(request)
    qs = queues_helper.get_moderated_queue()

    page = paginate(request, qs, per_page=20)
    flags = dict(ReviewFlag.FLAGS)
    reviews_formset = ReviewFlagFormSet(request.POST or None,
                                        queryset=page.object_list,
                                        request=request)

    if reviews_formset.is_valid():
        reviews_formset.save()
        return redirect(reverse('reviewers.apps.queue_moderated'))

    return render(request, 'reviewers/queue.html',
                  context(request, reviews_formset=reviews_formset,
                          tab='moderated', page=page, flags=flags))
Exemple #2
0
def queue_moderated(request):
    """Queue for reviewing app reviews."""
    queues_helper = ReviewersQueuesHelper(request)
    qs = queues_helper.get_moderated_queue()

    page = paginate(request, qs, per_page=20)
    flags = dict(ReviewFlag.FLAGS)
    reviews_formset = ReviewFlagFormSet(request.POST or None,
                                        queryset=page.object_list,
                                        request=request)

    if reviews_formset.is_valid():
        reviews_formset.save()
        return redirect(reverse('reviewers.apps.queue_moderated'))

    return render(request, 'reviewers/queue.html',
                  context(request, reviews_formset=reviews_formset,
                          tab='moderated', page=page, flags=flags))
Exemple #3
0
def queue_moderated(request):
    """Queue for reviewing app reviews."""
    rf = (Review.objects.no_cache()
                .exclude(Q(addon__isnull=True) | Q(reviewflag__isnull=True))
                .filter(addon__type=amo.ADDON_WEBAPP, editorreview=True)
                .order_by('reviewflag__created'))

    page = paginate(request, rf, per_page=20)
    flags = dict(ReviewFlag.FLAGS)
    reviews_formset = ReviewFlagFormSet(request.POST or None,
                                        queryset=page.object_list,
                                        request=request)

    if reviews_formset.is_valid():
        reviews_formset.save()
        return redirect(reverse('reviewers.apps.queue_moderated'))

    return render(request, 'reviewers/queue.html',
                  context(request, reviews_formset=reviews_formset,
                          tab='moderated', page=page, flags=flags))
Exemple #4
0
def queue_moderated(request):
    """Queue for reviewing app reviews."""
    rf = (Review.objects.no_cache()
                .exclude(Q(addon__isnull=True) | Q(reviewflag__isnull=True))
                .filter(addon__type=amo.ADDON_WEBAPP, editorreview=True)
                .order_by('reviewflag__created'))

    page = paginate(request, rf, per_page=20)
    flags = dict(ReviewFlag.FLAGS)
    reviews_formset = ReviewFlagFormSet(request.POST or None,
                                        queryset=page.object_list,
                                        request=request)

    if reviews_formset.is_valid():
        reviews_formset.save()
        return redirect(reverse('reviewers.apps.queue_moderated'))

    return render(request, 'reviewers/queue.html',
                  context(request, reviews_formset=reviews_formset,
                          tab='moderated', page=page, flags=flags))