Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit af7773f2800961c7a9628a3f8997e2e7ed81a7dd 1 parent b3b71a0
Malcolm Tredinnick malcolmt authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/models/fields/related.py
3  django/db/models/fields/related.py
View
@@ -114,7 +114,8 @@ def contribute_to_class(self, cls, name):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.