@permission_required("core.manage_shop")
def manage_vouchers(request):
    try:
        voucher_group = VoucherGroup.objects.all()[0]
    except IndexError:
        url = reverse("lfs_no_vouchers")
    else:
        url = reverse("lfs_manage_voucher_group", kwargs={"id": voucher_group.id})

    return HttpResponseRedirect(url)
Return the verbose plural form of a model name, with underscores
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/voucher/views.py/manage_vouchers--crossover with--dataset/ETHPy150Open kevin-brown/drf-json-api/rest_framework_json_api/utils.py/model_to_resource_type