From e4dc8be3a9963d55b4f654e31ecce80923508151 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 17 Dec 2009 16:13:17 +0000 Subject: [PATCH] [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 --- django/contrib/comments/views/comments.py | 4 ++-- 1 file 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))