Re: Something breaking if tag

2010-10-04 Thread derek
Remember that Django is "just" Python under the hood and that Python, like any other self-respecting language, will always treat different types as being, well, different! On Sep 29, 10:14 pm, aa56280 wrote: > Thanks for that. I figured it was something along those lines. I > didn't think Django

Re: Something breaking if tag

2010-09-29 Thread aa56280
Thanks for that. I figured it was something along those lines. I didn't think Django did a check on the type as well when evaluating the expression, but apparently it does. Very interesting. Thanks again. On Sep 29, 2:46 pm, Yo-Yo Ma wrote: > request.GET.get('subtopic') is returning a string,

Re: Something breaking if tag

2010-09-29 Thread Yo-Yo Ma
request.GET.get('subtopic') is returning a string, so your if statement is roughly equivalent to: >>> 1 == '1' False The sub_topic = int(request.GET.get('subtopic')) is the correct way to do that. At first glance it seems like a lot of work, but if Django tried to deserialize URL params automatic