Title

Wednesday, 21 January 2015

django flag for mobile request?


I'd like to have a flag variable to test mobile page in django.

Currently we need to use the flag on both python views, django templates, javascripts, handlebar templates.

It will be something like {% if is_testing_mobile %} do something.. {% endif %}

We deliver only few pages differently for mobile and for pc. (most pages are covered by bootstrap's fluidness)

How can we set up a variable to switch on-off mobile/pc?

Answer

No comments:

Post a Comment