From a46ffcb7b6ca7a95a006c4c9392e9631abe3f40a Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Wed, 5 Aug 2015 16:56:37 +0100 Subject: [PATCH] Use @lru_cache now that memoize is gone. --- email_from_template/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/email_from_template/utils.py b/email_from_template/utils.py index b0cc6ba..9af140a 100644 --- a/email_from_template/utils.py +++ b/email_from_template/utils.py @@ -1,14 +1,14 @@ -from django.utils.functional import memoize +from django.utils.lru_cache import lru_cache from . import app_settings +@lru_cache def get_render_method(): return from_dotted_path(app_settings.EMAIL_RENDER_METHOD) -get_render_method = memoize(get_render_method, {}, 0) +@lru_cache def get_context_processors(): return [from_dotted_path(x) for x in app_settings.EMAIL_CONTEXT_PROCESSORS] -get_context_processors = memoize(get_context_processors, {}, 0) def from_dotted_path(fullpath): """