Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed use of deprecated template_loader from [2230]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aae4f9701cca4ec73895c128a323d38c7e52bdad 1 parent fa80e70
Adrian Holovaty authored February 02, 2006
7  django/contrib/comments/templatetags/comments.py
... ...
@@ -1,6 +1,7 @@
1 1
 "Custom template tags for user comments"
2 2
 
3  
-from django.core import template, template_loader
  3
+from django.core import template
  4
+from django.core.template import loader
4 5
 from django.core.exceptions import ObjectDoesNotExist
5 6
 from django.models.comments import comments, freecomments
6 7
 from django.models.core import contenttypes
@@ -56,14 +57,14 @@ def render(self, context):
56 57
         context['options'] = ','.join(options)
57 58
         if self.free:
58 59
             context['hash'] = comments.get_security_hash(context['options'], '', '', context['target'])
59  
-            default_form = template_loader.get_template(FREE_COMMENT_FORM)
  60
+            default_form = loader.get_template(FREE_COMMENT_FORM)
60 61
         else:
61 62
             context['photo_options'] = self.photo_options
62 63
             context['rating_options'] = normalize_newlines(base64.encodestring(self.rating_options).strip())
63 64
             if self.rating_options:
64 65
                 context['rating_range'], context['rating_choices'] = comments.get_rating_options(self.rating_options)
65 66
             context['hash'] = comments.get_security_hash(context['options'], context['photo_options'], context['rating_options'], context['target'])
66  
-            default_form = template_loader.get_template(COMMENT_FORM)
  67
+            default_form = loader.get_template(COMMENT_FORM)
67 68
         output = default_form.render(context)
68 69
         context.pop()
69 70
         return output

0 notes on commit aae4f97

Please sign in to comment.
Something went wrong with that request. Please try again.