Re: __unicode__ rather than __str__ in Part 2 of 'Writing you first Django app"?

2016-02-12 Thread JHeasly
Hi Simon — I was pretty sure I was missing something obvious. Thanks for pointing it out. — John -- 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+

Re: __unicode__ rather than __str__ in Part 2 of 'Writing you first Django app"?

2016-02-11 Thread Simon Charette
Hi John, The tutorial is oriented towards Python 3 users where the `str` type is the equivalent of the Python 2 `unicode` hence why defining `__str__` is suggested. You'll notice that all models example suggest decorating model classes with the `python_2_unicode_compatible` decorator if you need

__unicode__ rather than __str__ in Part 2 of 'Writing you first Django app"?

2016-02-11 Thread JHeasly
In "Writing your first Django app, part 2" (https://docs.djangoproject.com/en/1.9/intro/tutorial02/), it's outlines adding a __str__() method to your models. But if you've got a unicode string that's called in the admin, you're going to get a big, unfriendly UnicodeEncodeError error when you l