> > This is what my model looks like at the moment > > class Poll(models.Model): > question = models.CharField(max_length=200) > pub_date = models.DateTimeField('date published') > > def __unicode__(self): > return self.question
Your indentation is wrong. The 'def __unicode__' line needs to be intended to the same level as question and pub_date, else it won't be considered part of the Poll class. Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> | http://www.fezconsulting.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---