Ticket #9638: app_label.patch

File app_label.patch, 663 bytes (added by lakin@…, 16 years ago)

Patch allowing app_label to be used.

  • db/models/fields/related.py

     
    9292            sup.contribute_to_class(cls, name)
    9393
    9494        if not cls._meta.abstract and self.rel.related_name:
    95             self.rel.related_name = self.rel.related_name % {'class': cls.__name__.lower()}
     95            self.rel.related_name = self.rel.related_name % {
     96                    'class': cls.__name__.lower(),
     97                    'app_label': cls._meta.app_label.lower(),
     98                    }
    9699
    97100        other = self.rel.to
    98101        if isinstance(other, basestring):
Back to Top