Beispiel #1
0
def unwatch_approved(request):
    """Stop watching approved revisions."""
    if request.LANGUAGE_CODE not in settings.SUMO_LANGUAGES:
        raise Http404
    ApproveRevisionInLocaleEvent.stop_notifying(request.user,
                                                locale=request.LANGUAGE_CODE)
    return HttpResponse()
Beispiel #2
0
def unwatch_approved(request):
    """Stop watching approved revisions."""
    if request.LANGUAGE_CODE not in settings.SUMO_LANGUAGES:
        raise Http404
    ApproveRevisionInLocaleEvent.stop_notifying(request.user,
                                                locale=request.LANGUAGE_CODE)
    return HttpResponse()
Beispiel #3
0
def unwatch_approved(request, product=None):
    """Stop watching approved revisions for a given product."""
    if request.LANGUAGE_CODE not in settings.SUMO_LANGUAGES:
        raise Http404

    kwargs = {'locale': request.LANGUAGE_CODE}
    if product is not None:
        kwargs['product'] = product
    ApproveRevisionInLocaleEvent.stop_notifying(request.user, **kwargs)

    return HttpResponse()
Beispiel #4
0
def unwatch_approved(request, product=None):
    """Stop watching approved revisions for a given product."""
    if request.LANGUAGE_CODE not in settings.SUMO_LANGUAGES:
        raise Http404

    kwargs = {'locale': request.LANGUAGE_CODE}
    if product is not None:
        kwargs['product'] = product
    ApproveRevisionInLocaleEvent.stop_notifying(request.user, **kwargs)

    return HttpResponse()