<?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>Code That Matters &#187; request</title>
	<atom:link href="http://www.codethatmatters.com/tag/request/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codethatmatters.com</link>
	<description>Pylons, rails, jQuery and other stuff that matters</description>
	<lastBuildDate>Sat, 16 Jul 2011 10:57:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirect to previous url after delete</title>
		<link>http://www.codethatmatters.com/2009/10/redirect-to-previous-url-after-delete/</link>
		<comments>http://www.codethatmatters.com/2009/10/redirect-to-previous-url-after-delete/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 14:03:31 +0000</pubDate>
		<dc:creator>henke</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[pylons]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=92</guid>
		<description><![CDATA[Ever wondered how you can easily redirect a user to the previous url? I.e after a users clicks a delete link or some other action you can use the more common url.current() because that points to the delete action. Instead use request.header REFERER like this:
UPDATE: New way of doing this in pylons 1.0 as redirect_to [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how you can easily redirect a user to the previous url? I.e after a users clicks a delete link or some other action you can use the more common url.current() because that points to the delete action. Instead use request.header REFERER like this:<br />
UPDATE: New way of doing this in pylons 1.0 as redirect_to is replaced by redirect. <em>Thanks to DB for pointing that out!</em></p>
<p>(This is a Pylons example)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">redirect<span class="br0">&#40;</span>url<span class="br0">&#40;</span>request.<span class="me1">referer</span><span class="br0">&#41;</span><span class="br0">&#41;</span></pre></div></div>

<p>Done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2009/10/redirect-to-previous-url-after-delete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

