Beispiel #1
0
def import_all_author_productions(request):
    if not request.user.is_staff:
        return redirect('home')
    releaser = get_object_or_404(Releaser, id=request.POST['releaser_id'])
    unmatched_demozoo_prods, unmatched_janeway_prods, matched_prods = get_production_match_data(releaser)

    for janeway_id, title, url, supertype in unmatched_janeway_prods:
        import_release(JanewayRelease.objects.get(janeway_id=janeway_id))

    return redirect('janeway_match_author', releaser.id)
Beispiel #2
0
def match_author(request, releaser_id):
    releaser = get_object_or_404(Releaser, id=releaser_id)

    unmatched_demozoo_prods, unmatched_janeway_prods, matched_prods = get_production_match_data(releaser)

    return render(request, 'janeway/match_author.html', {
        'releaser': releaser,
        'unmatched_demozoo_prods': unmatched_demozoo_prods,
        'unmatched_janeway_prods': unmatched_janeway_prods,
        'matched_prods': matched_prods,
    })