Ticket #8011: 8011.diff

File 8011.diff, 770 bytes (added by datakid, 5 years ago)

A cleaner patch with same results

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

     
    1313from django.core import exceptions
    1414from django import forms
    1515
    16 
    1716RECURSIVE_RELATIONSHIP_CONSTANT = 'self'
    1817
    1918pending_lookups = {}
     
    111110
    112111    def set_attributes_from_rel(self):
    113112        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
    116113        self.rel.field_name = self.rel.field_name or self.rel.to._meta.pk.name
    117114
    118115    def do_related_class(self, other, cls):
Back to Top