summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-09-09 18:34:24 +0000
committerJannis Leidel <jannis@leidel.info>2011-09-09 18:34:24 +0000
commit8258fe7845afda1f6820d2ed385d281ced20c943 (patch)
treef3c4295e814dacdbe9c5e7355846b4ee1d552a3a /django
parent64e16c094b3b4f551798f3dbff496fe5c6798f3b (diff)
Fixed #16042 -- Use the content types caching in the comments contrib app. Thanks, ptone, Julien Phalip and Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/comments/templatetags/comments.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/comments/templatetags/comments.py b/django/contrib/comments/templatetags/comments.py
index 024c4f658e..ce1825e529 100644
--- a/django/contrib/comments/templatetags/comments.py
+++ b/django/contrib/comments/templatetags/comments.py
@@ -47,7 +47,7 @@ class BaseCommentNode(template.Node):
def lookup_content_type(token, tagname):
try:
app, model = token.split('.')
- return ContentType.objects.get(app_label=app, model=model)
+ return ContentType.objects.get_by_natural_key(app, model)
except ValueError:
raise template.TemplateSyntaxError("Third argument in %r must be in the format 'app.model'" % tagname)
except ContentType.DoesNotExist: