<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Django foo &#187; request.post</title>
	<atom:link href="http://www.djangofoo.com/tag/request-post/feed" rel="self" type="application/rss+xml" />
	<link>http://www.djangofoo.com</link>
	<description>Django Tips and Tweaks</description>
	<lastBuildDate>Wed, 18 Aug 2010 09:38:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>request.POST get multiple values</title>
		<link>http://www.djangofoo.com/93/request-post-get-multiple-values</link>
		<comments>http://www.djangofoo.com/93/request-post-get-multiple-values#comments</comments>
		<pubDate>Wed, 24 Feb 2010 21:33:37 +0000</pubDate>
		<dc:creator>Davo</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[getlist]]></category>
		<category><![CDATA[querydict]]></category>
		<category><![CDATA[request.post]]></category>

		<guid isPermaLink="false">http://www.djangofoo.com/?p=93</guid>
		<description><![CDATA[The QueryDict.getlist() allows to get all the checkbox(or select list) values from the request.POST/GET object. Let&#8217;s assume we have a simple form with the following checkboxes. Each checkbox contains an ID of an artist. ... ... In views.py : def handle(request): if request.method == 'POST': artists = request.POST.getlist('artists') # now artists is a list of [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>QueryDict.getlist()</strong> allows to get all the checkbox(or select list) values from the <strong>request.POST/GET</strong> object. </p>
<p>Let&#8217;s assume we have a simple form with the following checkboxes. Each checkbox contains an ID of an artist.</p>
<pre class="brush: python">
<form method="post" action="">
   ... 
<input type="checkbox" value="1" name="artists" />
<input type="checkbox" value="2" name="artists" />
<input type="checkbox" value="3" name="artists" />
   ...
</form>
</pre>
<p>In views.py :</p>
<pre class="brush: python">
def handle(request):
    if request.method == 'POST':
         artists = request.POST.getlist('artists') # now artists is a list of [1,2,3]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.djangofoo.com/93/request-post-get-multiple-values/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

