Hi

I am trying to check an IP so some information will/will not be
displayed based on the first 8 digites of the remote IP address.

I have a vairable ip_address which contains the remote address and a
vairable accept_ip with a value "192.168." but when I carry out the
following it is not working correctly.

{% ifequal ip_address|slice:"8" accept_ip %}
   do something
{% endifequal %}


I have also tried
{% ifequal ip_address|slice:"8" "192.168." %}
   do something
{% endifequal %}

and
{% ifequal ip_address|slice:"8"|stringformat:"s" "192.168." %}
   do something
{% endifequal %}

the same results appaear whether the ip_address is 192.168..... or any
other range.

Thanks

Ken

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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