equal
deleted
inserted
replaced
487 |
487 |
488 def form_build_context(self, values=None): |
488 def form_build_context(self, values=None): |
489 """overriden to add edit[s|o] hidden fields and to ensure schema fields |
489 """overriden to add edit[s|o] hidden fields and to ensure schema fields |
490 have eidparam set to True |
490 have eidparam set to True |
491 |
491 |
492 edit[s|o] hidden fields are used t o indicate the value for the |
492 edit[s|o] hidden fields are used to indicate the value for the |
493 associated field before the (potential) modification made when |
493 associated field before the (potential) modification made when |
494 submitting the form. |
494 submitting the form. |
495 """ |
495 """ |
496 eschema = self.edited_entity.e_schema |
496 eschema = self.edited_entity.e_schema |
497 for field in self.fields[:]: |
497 for field in self.fields[:]: |
606 """defaut vocabulary method for the given relation, looking for |
606 """defaut vocabulary method for the given relation, looking for |
607 relation's object entities (i.e. self is the subject) |
607 relation's object entities (i.e. self is the subject) |
608 """ |
608 """ |
609 entity = self.edited_entity |
609 entity = self.edited_entity |
610 if isinstance(rtype, basestring): |
610 if isinstance(rtype, basestring): |
611 rtype = self.schema.rschema(rtype) |
611 rtype = entity.schema.rschema(rtype) |
612 done = None |
612 done = None |
613 assert not rtype.is_final(), rtype |
613 assert not rtype.is_final(), rtype |
614 if entity.has_eid(): |
614 if entity.has_eid(): |
615 done = set(e.eid for e in getattr(entity, str(rtype))) |
615 done = set(e.eid for e in getattr(entity, str(rtype))) |
616 result = [] |
616 result = [] |
628 """defaut vocabulary method for the given relation, looking for |
628 """defaut vocabulary method for the given relation, looking for |
629 relation's subject entities (i.e. self is the object) |
629 relation's subject entities (i.e. self is the object) |
630 """ |
630 """ |
631 entity = self.edited_entity |
631 entity = self.edited_entity |
632 if isinstance(rtype, basestring): |
632 if isinstance(rtype, basestring): |
633 rtype = self.schema.rschema(rtype) |
633 rtype = entity.schema.rschema(rtype) |
634 done = None |
634 done = None |
635 if entity.has_eid(): |
635 if entity.has_eid(): |
636 done = set(e.eid for e in getattr(entity, 'reverse_%s' % rtype)) |
636 done = set(e.eid for e in getattr(entity, 'reverse_%s' % rtype)) |
637 result = [] |
637 result = [] |
638 rsetsize = None |
638 rsetsize = None |