diff options
| author | Thomas Chaumeny <t.chaumeny@gmail.com> | 2014-08-30 20:06:38 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-08-31 09:03:53 +0200 |
| commit | 032c091659666ea63f80f4c2d7f9b8bc72214f18 (patch) | |
| tree | f946d5627fbc8ca7450edabd238c57f2048bd7e9 /django | |
| parent | 8b6cb9d0ddc21e68a1c63b25ceb685151ef21e6f (diff) | |
Fixed #23388 -- Made django.utils.timezone.override usable as a decorator
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/timezone.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/timezone.py b/django/utils/timezone.py index b8e40b031c..b545201bd3 100644 --- a/django/utils/timezone.py +++ b/django/utils/timezone.py @@ -16,6 +16,7 @@ except ImportError: from django.conf import settings from django.utils import six +from django.utils.decorators import ContextDecorator __all__ = [ 'utc', 'get_fixed_timezone', @@ -248,7 +249,7 @@ def deactivate(): del _active.value -class override(object): +class override(ContextDecorator): """ Temporarily set the time zone for the current thread. |
