title: For loop in views
body: <p>In views I want to get car-object, then change <code>first_year</code> var. </p>
  
  <pre><code>def cars(request, mark_id, year=year):
          #BMW, etc.
      mark = get_object_or_404(Mark, pk=mark_id, active=1)
          #M, X-series, etc.
      for group in mark.groups.iterator():
          group.first_year.year = int(year)-int(group.first_year.year)
      return render(request, 'cars.html', {  'mark':mark, })
  </code></pre>
  
  <p>So, in template I use:</p>
  
  <pre><code>{% for i in mark.groups.all %}
  
  {{i.first_year}}
  
  {% endfor %}
  </code></pre>
  
  <p>And it returns the values from db, not my <code>group.first_year.year</code>. As you can understand, there is 3 models - mark, groups and first_year. If you need, I can publish they here, but I think, that something wrong in my views. </p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit. Models.</strong></p>
  
  <pre><code>class First_Year(models.Model):
      year = models.IntegerField()
      def __unicode__(self):
          return str(self.year)
  
  class Groups(models.Model):
          many_other_fields
      mark = models.ForeignKey(Mark, related_name='groups')
      last_update = models.DateTimeField()
      first_year = models.ForeignKey(First_Year, related_name='first_year')
      def __unicode__(self):
          return self.name
      def altered_date(self, year):
          altered_year = int(year)-int(self.first_year.year)
          return altered_year
  </code></pre>
  
  <p>Without model Mark, bacause it has many-many fields without year and etc.</p>