Friday, July 4, 2014

Re: Unicode Str error [Beginner question]

On Thu, Jul 3, 2014 at 8:08 PM, Lian Tombing <lyanaz@gmail.com> 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.

You must use either tabs or spaces to indent your code, not both tabs
and spaces. Configure your editor to output spaces instead of tab when
you press the tab key, and reindent your code.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1KWhUXXWoyaqAnX4%3DG0KmKu2AW%3DRRx8GZiAHqC1csL3Uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment