diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-01-08 15:04:16 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-01-08 15:08:26 +0100 |
| commit | de4bfb3fad7caa426fa1f5625df6fbd7579e7cb7 (patch) | |
| tree | 3bbef592ed1838ddbb37488746f93ac9508111ed | |
| parent | ade985999657eaef6a9510c2aeba9b2196d7bf6e (diff) | |
Simplified verbose_name_raw property
| -rw-r--r-- | django/db/models/options.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py index 6b48d2733b..59f7e25ab2 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -18,7 +18,7 @@ from django.utils.encoding import force_text, smart_text, python_2_unicode_compa from django.utils.functional import cached_property from django.utils.lru_cache import lru_cache from django.utils.text import camel_case_to_spaces -from django.utils.translation import activate, deactivate_all, get_language, string_concat +from django.utils.translation import override, string_concat EMPTY_RELATION_TREE = tuple() @@ -339,11 +339,8 @@ class Options(object): (so that we get the same value regardless of currently active locale). """ - lang = get_language() - deactivate_all() - raw = force_text(self.verbose_name) - activate(lang) - return raw + with override(None): + return force_text(self.verbose_name) @property def swapped(self): |
