Re: Hi All: __unicode__(self)

2009-10-12 Thread Kenneth Gonsalves
On Monday 12 Oct 2009 11:25:27 am Russell Keith-Magee wrote: > On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves > > wrote: > > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: > >> class Poll(models.Model): > >> question = models.CharField(max_length=200) > >>

Re: Hi All: __unicode__(self)

2009-10-12 Thread Denis Bahati
Thank in advance for the advices. On Mon, Oct 12, 2009 at 8:55 AM, Russell Keith-Magee wrote: > > On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves > wrote: > > > > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: > >> class

Re: Hi All: __unicode__(self)

2009-10-11 Thread Russell Keith-Magee
On Mon, Oct 12, 2009 at 1:44 PM, Kenneth Gonsalves wrote: > > On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: >> class Poll(models.Model): >>     question = models.CharField(max_length=200) >>     pub_date = models.DateTimeField('date published') >> def

Re: Hi All: __unicode__(self)

2009-10-11 Thread Russell Keith-Magee
On Mon, Oct 12, 2009 at 1:35 PM, Denis Bahati wrote: > Hi all, > I have a problem with __unicode__(self) function it doesn't give any changes > to the display of poll list it just display the Poll object when i code like > below: Ok - you need to do two things. 1) Stop

Re: Hi All: __unicode__(self)

2009-10-11 Thread Kenneth Gonsalves
On Monday 12 Oct 2009 11:05:38 am Denis Bahati wrote: > class Poll(models.Model): > question = models.CharField(max_length=200) > pub_date = models.DateTimeField('date published') > def __unicode__(self): > return self.question > def was_published_today(self): > return

Hi All: __unicode__(self)

2009-10-11 Thread Denis Bahati
Hi all, I have a problem with __unicode__(self) function it doesn't give any changes to the display of poll list it just display the Poll object when i code like below: from django.db import models import datetime class Poll(models.Model): question = models.CharField(max_length=200)