def _get_drafts(user):
    drafts = {'image': None, 'video': None}
    if user.is_authenticated():
        drafts['image'] = Image.objects.filter(creator=user, is_draft=True)
        drafts['video'] = Video.objects.filter(creator=user, is_draft=True)
    return drafts
Get video and image drafts for a given user.
dataset/ETHPy150Open mozilla/kitsune/kitsune/gallery/views.py/_get_drafts