]> asedeno.scripts.mit.edu Git - bluechips.git/commitdiff
don't show the 'use mobile interface' link if that page is not available on the mobil...
authorScott Torborg <scott@crookedmedia.com>
Fri, 13 Nov 2009 05:02:29 +0000 (21:02 -0800)
committerScott Torborg <scott@crookedmedia.com>
Fri, 13 Nov 2009 05:02:29 +0000 (21:02 -0800)
bluechips/lib/base.py

index df659939f79df0ed6c1eabe25a92a0903ebc0b05..abff9ce6ac458ac69a227c78a6efff5b28713d38 100644 (file)
@@ -62,7 +62,9 @@ def render(name, *args, **kwargs):
             try:
                 return render_mako('/mobile' + name, *args, **kwargs)
             except TopLevelLookupException:
-                pass
+                # If a mobile template doesn't exist for this page, don't show
+                # the 'use mobile interface' link.
+                c.mobile_client = False
     return render_mako(name, *args, **kwargs)
 
 __all__ = ['c', 'h', 'render', 'model', 'meta', '_', 'ungettext', 'N_',