Hi there,

I have 2 css files. One specifically for IE because it's so horrible.
I'd like to load either or css files depending on the browser.

I know I have to use
        agent = request.META['HTTP_USER_AGENT']

I looked at this http://djangosnippets.org/snippets/77/ but it seems
complex.

All I want is something like this.
{% if request.META['HTTP_USER_AGENT'] == 'IE' %}
        <link href="{{ MEDIA_URL }}css/ie.css" rel="stylesheet"
type="text/css" media="all">
{% else %}
        <link href="{{ MEDIA_URL }}css/site.css" rel="stylesheet"
type="text/css" media="all">
{% endif %}

Can I have some advice or point me to a place which shows what to do.
Thanks a lot.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to