django flag for mobile request? -


I have to be a flag variable to test the mobile page in the digengo.

We currently need it to use the flag on both Dragon View, Django templates, Javascript, handler templates.

Something like this might be done, like something like {% if_testing_mobile%}. {% Endif%}

We only provide some pages for mobile and PC To distribute separately. (Most pages are covered by bootstrap fluid)

How can we set a variable to switch / switch on mobile?

Try it,

 import  mobile_detect_mobile def my_mobile_view (Requested): is_mobile = if request.mobile: is_mobile = true #with some mobile render (request, 'page html', {'is_mobile': is_mobile})   

Page.html:

  {% if_mobile%} presents mobile CSS {% else%} then PC CSS {% endif%}    

Comments

Popular posts from this blog

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -