tag:blogger.com,1999:blog-1109993290999893534.post8157722589689908150..comments2018-10-16T12:58:58.015+03:00Comments on SimionBaws.ro: Compare integer variable in django templatesUnknown[email protected]Blogger7125tag:blogger.com,1999:blog-1109993290999893534.post-78693318626212909842018-10-16T12:58:58.015+03:002018-10-16T12:58:58.015+03:00Thanks for sharing. Django is the powerful framewo...Thanks for sharing. Django is the powerful framework of Python. Kanhasoft is the leading <a href="https://www.kanhasoft.com/django-application-development.html" rel="nofollow">Django web development company in India</a> and USA. With the team of 45 experienced Web developers, we are outsourcing mobile and web application services to Canada, USA, Denmark, Australia, South Africa and more.Kanhasofthttps://www.blogger.com/profile/13496015473506059057[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-827157686464515562014-08-04T00:07:00.000+03:002014-08-04T00:07:00.000+03:00sounds hacky.sounds hacky.pedro[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-54304341046595693032015-02-19T08:12:00.000+02:002015-02-19T08:12:00.000+02:00you can use {% if some_var == '3' %}you can use {% if some_var == '3' %}tolerioushttp://tolerious.com/[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-32639136113322563992015-02-19T08:58:00.000+02:002015-02-19T08:58:00.000+02:00It works, but only for equal comparison :)It works, but only for equal comparison :)SimionBawshttp://simionbaws.ro[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-52118400439286842502015-02-24T06:44:00.000+02:002015-02-24T06:44:00.000+02:00Yes, but if I want to compare between numbers such...Yes, but if I want to compare between numbers such as 'a > b', any way to do this?tolerioushttp://tolerious.com/[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-37188576831203426282015-02-24T10:28:00.000+02:002015-02-24T10:28:00.000+02:00{% if a|add:0 > b|add:0 %}...But don't writ...{% if a|add:0 > b|add:0 %}<br>...<br><br>But don't write too much logic in templates.<br>Data should already come prepared for the template.<br>That's why django does not allow complex comparisons, with "and" and "or" combined.SimionBawshttp://simionbaws.ro[email protected]tag:blogger.com,1999:blog-1109993290999893534.post-36460044578435161462015-02-25T10:40:00.000+02:002015-02-25T10:40:00.000+02:00Oh, yes, it's so kind of you, thank you for yo...Oh, yes, it's so kind of you, thank you for your help~tolerioushttp://tolerious.com/[email protected]