TypeError: 'in <string>' requires string as left operand, not QueryDict
<p>While updating the edited blog i am getting this error: in edit_article function
Here is my function,</p>

<pre><code>def edit_article(request, id):
    session_start(request)
    if Article.exists(id):
        article = Article.getByName(id)
    else:
        article = Article(id)
    if request.method == 'POST' and request.POST in "content":
        if has_article_access(request, article):
            article.body = request.POST['content']
            article.save()
            if 'counter_edit' in request.session:
                request.session['counter_edit'] += 1
            else:
                request.session['counter_edit'] = 1
            delete_article_locked(request, article)
            return HttpResponseRedirect('/myblog/?edited')
        else:
            return HttpResponseRedirect('/myblog/?locked')
    else:
        if has_article_access(request, article):
            start_article_locked(request, article)
        else:
            return HttpResponseRedirect('/myblog/?locked')
        return render_to_response("edit.html",
                                  {
                                   'name': article.title,
                                   'content': article.body,
                                   'id':article.id
                                  },
                                  context_instance=RequestContext(request)
        )
</code></pre>

<p>The error shows in 7th line.</p>

<p>If you want to check if <code>request.POST</code> has the key <code>"content"</code>:</p>

<pre><code>if request.method == 'POST' and "content" in request.POST:
</code></pre>

python python-3.x