On Feb 26, 7:10 pm, seamusjr <seamu...@gmail.com> wrote: > > But what is points? Where is it coming from? As the traceback shows > > you, you haven't set the points variable anywhere. Where are you > > expecting it to come from? > > -- > > DR. > > I want to iterate thru the points property of the Song object, from > models.py, how can I output that from the views to the db? Below is > from models.py > > class Song(models.Model): > poll = models.ForeignKey(Poll) > name = models.CharField(max_length=200) > points = models.IntegerField() > > def __unicode__(self): > return self.song
I'm sorry, I really don't understand what you're trying to do. How do you mean, iterate through? Points is an integer field, there is only one value. If you want me to help you, please post your entire views.py, models.py and template on dpaste.com. Post the link here, along with a full explanation of what you're trying to do, and what you expect the output to be. -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---