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
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
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,
>
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
4 matches
Mail list logo