

def formfield_for_foreignkey(self, db_field, request, **kwargs):
    if ((db_field.name == 'feed') and (not request.user.is_superuser)):
        kwargs['queryset'] = Feed.objects.filter(lifestream__user=request.user)
        return db_field.formfield(**kwargs)
    return super(ItemAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)

dataset/ETHPy150Open IanLewis/django-lifestream/lifestream/admin.py ItemAdmin.formfield_for_foreignkey/original