<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Turbogears and mobile mini-site logins</title>
	<atom:link href="http://psychicorigami.com/2007/10/12/turbogears-and-mobile-mini-site-logins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.psychicorigami.com/2007/10/12/turbogears-and-mobile-mini-site-logins/</link>
	<description>folding with my brain</description>
	<pubDate>Tue, 06 Jan 2009 04:15:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: john</title>
		<link>http://www.psychicorigami.com/2007/10/12/turbogears-and-mobile-mini-site-logins/#comment-9981</link>
		<dc:creator>john</dc:creator>
		<pubDate>Sat, 22 Nov 2008 12:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://psychicorigami.com/2007/10/12/turbogears-and-mobile-mini-site-logins/#comment-9981</guid>
		<description>I've recently changed the mob_login decorator to work around a bug with the Nokia 6300 browser re-posting form data upon receiving a redirect:

&lt;pre&gt;&lt;code&gt;
def mob_login(fn):
    def decorated(*arg,**kw):
        if identity.current.anonymous or not identity.in_group('active'):
            msg=None
            if not identity.current.anonymous and not identity.in_group('active'):
                msg='sorry your account is not active yet'
            return dict(tg_template="cheetah:chrss.templates.mobile.login",user='',msg=msg)
        # strip out user and pwd params
        # as some phones (e.g. Nokia 6300)
        # seem to do a post after the redirect from logging
        # in and we end up with extra params attached to the request
        kw.pop('user',None)
        kw.pop('pwd',None)
        return fn(*arg,**kw)
    return decorated
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve recently changed the mob_login decorator to work around a bug with the Nokia 6300 browser re-posting form data upon receiving a redirect:</p>
<pre><code>
def mob_login(fn):
    def decorated(*arg,**kw):
        if identity.current.anonymous or not identity.in_group('active'):
            msg=None
            if not identity.current.anonymous and not identity.in_group('active'):
                msg='sorry your account is not active yet'
            return dict(tg_template="cheetah:chrss.templates.mobile.login",user='',msg=msg)
        # strip out user and pwd params
        # as some phones (e.g. Nokia 6300)
        # seem to do a post after the redirect from logging
        # in and we end up with extra params attached to the request
        kw.pop('user',None)
        kw.pop('pwd',None)
        return fn(*arg,**kw)
    return decorated
</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
