mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #6262 -- Added a cached template loader, and modified existing template loaders and tag to be cacheable. Thanks to Mike Malone for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -37,8 +37,8 @@ def setup_test_environment():
|
||||
- Set the email backend to the locmem email backend.
|
||||
- Setting the active locale to match the LANGUAGE_CODE setting.
|
||||
"""
|
||||
Template.original_render = Template.render
|
||||
Template.render = instrumented_test_render
|
||||
Template.original_render = Template._render
|
||||
Template._render = instrumented_test_render
|
||||
|
||||
mail.original_SMTPConnection = mail.SMTPConnection
|
||||
mail.SMTPConnection = locmem.EmailBackend
|
||||
@@ -57,7 +57,7 @@ def teardown_test_environment():
|
||||
- Restoring the email sending functions
|
||||
|
||||
"""
|
||||
Template.render = Template.original_render
|
||||
Template._render = Template.original_render
|
||||
del Template.original_render
|
||||
|
||||
mail.SMTPConnection = mail.original_SMTPConnection
|
||||
|
||||
Reference in New Issue
Block a user