On Aug 19, 4:14 pm, Mirat Bayrak <miratcanbay...@gmail.com> wrote: > http://dpaste.com/82737/< here is models.py , as you see i wrote > doctests for every model and they are working well. But when i try to > create GeneralProperties or AccomodationProperties from admin page, > when i press save button it gives that error :http://dpaste.com/82736/ > > Do you see what i am missing? Thank you a lot.
This has nothing to do with doctests. The __unicode__ function for your GeneralProperties model is: def __unicode__(self): return "General Properties of", self.boat As the error says, this is returning a tuple, not a unicode string. You need to format this as you have done with all the other models. By the way, none of your unicode methods are actually returning unicode values, they are returning bytestrings. This *will* cause failure as soon as you have a name that isn't ASCII - eg an accent. You need to make sure that any literal string is prefixed by u to make it work: return u"General Properties of %s" % self.boat -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---