Login

Tag "iphone"

Snippet List

mini_render_to_response

You need the mini-detector middleware installed [http://www.iterasi.net/openviewer.aspx?sqrlitid=-e2dfig9w0yrclxaigp-uw](http://www.iterasi.net/openviewer.aspx?sqrlitid=-e2dfig9w0yrclxaigp-uw). This is a drop in replacement to render_to_response. When using mini_render_to_response it will try to load a version of your template with mini at the end. For example "home_mini.html" instead of "home.html". If it doesn't find the _mini version it falls back to the regular "home.html" version of your template. Easy way to maintain a "small screen" version of your templates for iPhone or other small screen devices.

  • templates
  • render
  • iphone
  • mini
Read More

iPhone Redirect Middleware

I didn't really like the current state of iPhone/Mobile redirect middleware mainly because I wanted something that was closer to twitters use case. So I came up with this. I don't think it a great snippet and I will probably fix it in the near future. But it works.

  • middleware
  • session
  • redirect
  • iphone
Read More

iPhoneMiddleware

Adds an additional template dir to settings.TEMPLATE_DIRS if the request's HTTP_USER_AGENT string has the word iPhone in it. Allows you to easily create iPhone templates.

  • middleware
  • user-agent
  • iphone
Read More

3 snippets posted so far.