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

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 .