Ticket #13822: foreignkey_attname.diff
File foreignkey_attname.diff, 575 bytes (added by , 14 years ago) |
---|
-
django/db/models/fields/related.py
835 835 'model': self.rel.to._meta.verbose_name, 'pk': value}) 836 836 837 837 def get_attname(self): 838 return '%s_id' % self.name838 return self: '%s_%s' % (self.name, self.rel.field_name) 839 839 840 840 def get_validator_unique_lookup_type(self): 841 841 return '%s__%s__exact' % (self.name, self.rel.get_related_field().name)