Opened 11 years ago

Closed 11 years ago

#4905 closed (invalid)


Reported by: Alexander.Suvorov@… Owned by: Jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Beginner question. Is there any reason why def unicode(self): do not work ?

n= Poll(question="What's up dude ?",


<Poll: Poll object>

from django.db import models
import datetime

class Poll(models.Model):

question = models.CharField(maxlength=200)
pub_date = models.DateTimeField('date published')

def unicode(self):

return self.question

def was_published_today(self):

return ==

class Choice(models.Model):

poll = models.ForeignKey(Poll)
choice = models.CharField(maxlength=200)
votes = models.IntegerField()

def unicode(self):

return self.choice

Thanks in advance

Change History (1)

comment:1 Changed 11 years ago by Thomas Steinacher <tom@…>

Resolution: invalid
Status: newclosed

You're probably not using the latest SVN version. 0.96 doesn't support this. Please ask such questions in future on the django-users mailing list.

Note: See TracTickets for help on using tickets.
Back to Top