summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2009-12-17 16:13:17 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2009-12-17 16:13:17 +0000
commite4dc8be3a9963d55b4f654e31ecce80923508151 (patch)
treeb93d887d0e25b864d82e72f7c1e1388e9ca6ef71
parentbdf21ccf8b5aaeb6c2bed3ce8673d7d31c627f8d (diff)
downloaddjango-e4dc8be3a9963d55b4f654e31ecce80923508151.tar.gz
[soc2009/multidb] Added using argument to comment view. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/comments/views/comments.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py
index 7fbe80eead..cea3eefae0 100644
--- a/django/contrib/comments/views/comments.py
+++ b/django/contrib/comments/views/comments.py
@@ -25,7 +25,7 @@ class CommentPostBadRequest(http.HttpResponseBadRequest):
@csrf_protect
@require_POST
-def post_comment(request, next=None):
+def post_comment(request, next=None, using=None):
"""
Post a comment.
@@ -50,7 +50,7 @@ def post_comment(request, next=None):
return CommentPostBadRequest("Missing content_type or object_pk field.")
try:
model = models.get_model(*ctype.split(".", 1))
- target = model._default_manager.get(pk=object_pk)
+ target = model._default_manager.using(using).get(pk=object_pk)
except TypeError:
return CommentPostBadRequest(
"Invalid content_type value: %r" % escape(ctype))