@permission_required("core.manage_shop")
def export_dispatcher(request):
    """Dispatches to the first export or to the add form.
    """
    try:
        export = Export.objects.all()[0]
    except __HOLE__:
        return HttpResponseRedirect(reverse("lfs_export_add_export"))
    else:
        return HttpResponseRedirect(
            reverse("lfs_export", kwargs={"export_id": export.id}))
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/views/export.py/export_dispatcher