Re: Unicode Str error [Beginner question]

2014-07-04 Thread Tom Evans
On Thu, Jul 3, 2014 at 8:08 PM, Lian Tombing wrote: > When I tried to implement the example, > > class Poll(models.Model): > # ... > def __unicode__(self): # Python 3: def __str__(self): > return self.question > > I get the error, > > Tab error: inconsistent use of tabs and spaces

Re: Unicode Str error [Beginner question]

2014-07-03 Thread Jorge Andrés Vergara Ebratt
Def __str__ is a comment, you can ommit it On Jul 3, 2014 2:37 PM, "Lian Tombing" wrote: > When I tried to implement the example, > > class Poll(models.Model): > # ... > def __unicode__(self): # Python 3: def __str__(self): > return self.question > > I get the error, > > Tab erro

Re: Unicode Str error [Beginner question]

2014-07-03 Thread José Javier Castro Matamoros
Could you please put all the code of the model. On Thu, Jul 3, 2014 at 1:08 PM, Lian Tombing wrote: > When I tried to implement the example, > > class Poll(models.Model): > # ... > def __unicode__(self): # Python 3: def __str__(self): > return self.question > > I get the error, >

Unicode Str error [Beginner question]

2014-07-03 Thread Lian Tombing
When I tried to implement the example, class Poll(models.Model): # ... def __unicode__(self): # Python 3: def __str__(self): return self.question I get the error, Tab error: inconsistent use of tabs and spaces. If I put def __str__ (self): in the same tab as class, it does no