django-if template doesnt work properly
<p>I have a list of stations and I have to display stations from 'start'. start and stop contain station ids. I am trying in this way but when I run all I get is a blank page.
showtrain.html :-</p>

<pre><code> &lt;table&gt;
 &lt;tr&gt;
  {% for st in st_list %}
    {% if  st.station_id &gt;= start %}
    &lt;td&gt; {{ st.station_id }} &lt;/td&gt;
    {% endif %}
  {% endfor %}
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>nothing works inside if except conditions like {% if start %}. i know i am missing something trivial. Please help me figure it out. i am using django 1.6.
edit: views.py-</p>

<pre><code>def runtrain(request):
    if request.method == 'POST':
        #request.post.get method retrieves user input from a form
            start = request.POST.get('start', None)
        stop = request.POST.get('stop', None)
        rid = request.session.get('route_id')
        stlist = SequenceTable.objects.filter(route_id = rid)
        #print start
        data2 = {
                "start" : start,
                "stop" : stop,
                "st_list" : stlist,

            }
    return render(request,"showtrain.html",data2)
</code></pre>

<p>models.py-</p>

<pre><code> class SequenceTable(models.Model):
        id = models.AutoField( primary_key=True )
        route_id = models.ForeignKey( route, on_delete=models.CASCADE)
        station_id = models.ForeignKey(Stations, on_delete=models.CASCADE)
        sequence_no = models.IntegerField( null=True )

        #def __str__(self):
        #   return self.sequence_no
class Stations(models.Model):
    station_id = models.AutoField( primary_key=True )
    station = models.CharField( max_length=20 )
    station_code = models.CharField( max_length=10 )
  def __str__(self):
        return self.station_code
</code></pre>

<p>as stated by  RemcoGerlich the problem lies in mismatched datatype. the value of start returned from form is string type and station_id is integer. if cannot compare them and hence control doesnt enter if statements so nothing gets printed</p>

python django