

def formfield(self, **kwargs):
    if self.rel.parent_link:
        return None
    return super(OneToOneField, self).formfield(**kwargs)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py OneToOneField.formfield/original