diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-09-02 20:17:15 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-09-03 13:46:41 +0200 |
| commit | 2ced2f785d5aca0354abf5841d5449b7a49509dc (patch) | |
| tree | 46ade22a7c8d9ccdbab4a7fcb25f702172352521 /django/template/context_processors.py | |
| parent | b1d6b0a7b121eec860b518b4903d7c8c74f7773b (diff) | |
Replaced smart_* by force_* calls whenever possible
The smart_* version should only be used when a lazy string should keep
its lazy status.
Diffstat (limited to 'django/template/context_processors.py')
| -rw-r--r-- | django/template/context_processors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/context_processors.py b/django/template/context_processors.py index 5568ed9134..da5276ce44 100644 --- a/django/template/context_processors.py +++ b/django/template/context_processors.py @@ -13,7 +13,7 @@ import itertools from django.conf import settings from django.middleware.csrf import get_token -from django.utils.encoding import smart_text +from django.utils.encoding import force_text from django.utils.functional import SimpleLazyObject, lazy @@ -30,7 +30,7 @@ def csrf(request): # instead of returning an empty dict. return 'NOTPROVIDED' else: - return smart_text(token) + return force_text(token) return {'csrf_token': SimpleLazyObject(_get_val)} |
