<?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 Dev &#187; CSRF</title>
	<atom:link href="http://django-dev.com/tag/csrf/feed" rel="self" type="application/rss+xml" />
	<link>http://django-dev.com</link>
	<description>About Django development</description>
	<lastBuildDate>Sun, 20 Jun 2010 18:23:00 +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>Django 1.2.1 – CSRF verification failed &#8211; 403 Error</title>
		<link>http://django-dev.com/django-1-2-1-%e2%80%93-csrf-verification-failed-403-error-2010-06</link>
		<comments>http://django-dev.com/django-1-2-1-%e2%80%93-csrf-verification-failed-403-error-2010-06#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:52:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[CSRF]]></category>

		<guid isPermaLink="false">http://django-dev.com/?p=8</guid>
		<description><![CDATA[Here is the kind of error you can get while attempting to make a POST request after migrating to Django 1.2.1: 403 Forbidden CSRF verification failed. Request aborted. Help Reason given for failure: CSRF cookie not set. To correct this, all you have to do is to add  &#8216;django.middleware.csrf.CsrfViewMiddleware&#8217;, and &#8216;django.middleware.csrf.CsrfResponseMiddleware&#8217; to your MIDDLEWARE_CLASSES in [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the kind of error you can get while attempting to make a POST request after migrating to Django 1.2.1:</p>
<p><code>403 Forbidden</code><br />
<code>CSRF verification failed. Request aborted.<br />
 Help</code><br />
<code>Reason given for failure:</code><br />
<code>CSRF cookie not set.</code></p>
<p>To correct this, all you have to do is to add  &#8216;django.middleware.csrf.CsrfViewMiddleware&#8217;, and &#8216;django.middleware.csrf.CsrfResponseMiddleware&#8217; to your <code>MIDDLEWARE_CLASSES</code>  in your settings.py file.</p>
<p><code>MIDDLEWARE_CLASSES = (<br />
...<br />
'django.contrib.sessions.middleware.SessionMiddleware',<br />
'django.middleware.csrf.CsrfViewMiddleware',<br />
'django.middleware.csrf.CsrfResponseMiddleware',<br />
...<br />
)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://django-dev.com/django-1-2-1-%e2%80%93-csrf-verification-failed-403-error-2010-06/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
