mirror of
https://github.com/django/django.git
synced 2024-12-25 10:35:48 +00:00
Fixed #8011 -- Be careful not to evalute lazy-translated Meta.verbose_name
values whilst importing models. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b3b71a0922
commit
af7773f280
@ -114,7 +114,8 @@ class RelatedField(object):
|
||||
|
||||
def set_attributes_from_rel(self):
|
||||
self.name = self.name or (self.rel.to._meta.object_name.lower() + '_' + self.rel.to._meta.pk.name)
|
||||
self.verbose_name = self.verbose_name or self.rel.to._meta.verbose_name
|
||||
if self.verbose_name is None:
|
||||
self.verbose_name = self.rel.to._meta.verbose_name
|
||||
self.rel.field_name = self.rel.field_name or self.rel.to._meta.pk.name
|
||||
|
||||
def do_related_class(self, other, cls):
|
||||
|
Loading…
Reference in New Issue
Block a user