Ticket #5373: 5373_related.py.diff

File 5373_related.py.diff, 680 bytes (added by datakid, 5 years ago)

Patch changes related.py instead of init.py

  • django/db/models/fields/related.py

     
    111111
    112112    def set_attributes_from_rel(self):
    113113        self.name = self.name or (self.rel.to._meta.object_name.lower() + '_' + self.rel.to._meta.pk.name)
    114         if self.verbose_name is None:
    115             self.verbose_name = self.rel.to._meta.verbose_name
     114        self.verbose_name = self.rel.to._meta.verbose_name
    116115        self.rel.field_name = self.rel.field_name or self.rel.to._meta.pk.name
    117116
    118117    def do_related_class(self, other, cls):
Back to Top