diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-12-29 08:56:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-29 08:56:39 +0100 |
| commit | ce30e750e6259068ac348aa71f855a5f70d2d49f (patch) | |
| tree | ed025908608c0e6e51d29646144bdacb0b99bdca /django/db/models/fields/__init__.py | |
| parent | c76d51b3ad34bc2ed2155054bfb283ef53beb26a (diff) | |
Used model's Options.label where applicable.
Follow up to b7a3a6c9ef0a89625881b47594120bca55fa2e49.
Diffstat (limited to 'django/db/models/fields/__init__.py')
| -rw-r--r-- | django/db/models/fields/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index c84136680d..5b8b3cab23 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -183,8 +183,7 @@ class Field(RegisterLookupMixin): if not hasattr(self, 'model'): return super().__str__() model = self.model - app = model._meta.app_label - return '%s.%s.%s' % (app, model._meta.object_name, self.name) + return '%s.%s' % (model._meta.label, self.name) def __repr__(self): """Display the module, class, and name of the field.""" |
