Clone from Google Code:  Django middleware and view decorator to detect phones and small-screen devices