Well the first suspicious thing was that you were testing to see if it
was equal to the string "0". That tells me you don't understand how
equality works in python. Python is strongly typed. Strings and
integers are not the same thing, and will never be equal to one another.
Without more informa
If I set it to "Enabled" and then check if it is indeed {% if
EnableLogUpload == "Enabled" %} it does not enter the if statement.
>
>
What am I doing wrong??
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web vi
On Fri, Mar 16, 2012 at 9:25 AM, HarryBoy wrote:
>> Sorry the '==' was a typo, its actually:
>>
>> EnableLogUpload = "Enabled"
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.goog
Anyone?
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/dOBYPgDjwHcJ.
To post to this group, send email to django-users@googlegroups.com.
To uns
>
> Sorry the '==' was a typo, its actually:
> EnableLogUpload = "Enabled"
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/Tu0wfrtAPJUJ.
To post to thi
On Fri, Mar 16, 2012 at 1:01 PM, HarryBoy wrote:
>> Hi, thanks for the reply.
>
>
> I printed the value and its actually 0 every time.
>
> Why is it 0 when I set it to EnableLogUpload == "Enabled"??
>
> Thanks
>
'==' tests equality
'=' assigns a rvalue
Cheers
Tom
--
You received this message
>
> Hi, thanks for the reply.
I printed the value and its actually 0 every time.
Why is it 0 when I set it to EnableLogUpload == "Enabled"??
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
ht
On Fri, Mar 16, 2012 at 6:00 AM, HarryBoy wrote:
> I have the following:
>
>
> name="EnableLogUpload" value="true" {% if EnableLogUpload == '1' %}
> checked="checked" {% endif %} />Enabled
> name="EnableLogUpload" value="false" {% if EnableLo
I have the following:
Enabled
Disabled
Then the following if statement:
{% if
EnableLogUpload == '1' %} Enabled {% else %} Disabled {% endif %}
The above code works as expected (If EnableLogUpload equals to true
then 'Ena
9 matches
Mail list logo