I think I hav a problem at request.POST['title']
MultiValueDictKeyError at /blog/add/post/"'title'"Request Method: GETRequest URL: http://119.81.247.69:8000/blog/add/post/Django Version: 1.8.2Exception Type: MultiValueDictKeyErrorException Value:
"'title'"Exception Location: /usr/local/lib/python2.7/dist- packages/django/utils/datastructures.py in getitem, line 322Python Executable: /usr/bin/pythonPython Version: 2.7.3
views.py
def add_post(request):entry_title = request.POST["title"]return HttpResponse('Hello %s' % entry_title)
write.html
<form method="POST" action="/blog/add/post/">
<p><label for "title">Title</label><input type="text" id="title" name="title" value="" />
</p>
<p><label for 'category'>Category</label><select id="category" name="category"></select>
</p>
<p><label for 'tags'>Tags</label><input type="text" id="tags" value="" />
</p>
<p><textarea id="content" name="content"></textarea>
</p>
<p><input type="submit" value="Write" />
</p>