#27519: Issue in Django 1.8.5 model class -------------------------------------+------------------------------------- Reporter: Nitish | Owner: nobody Nandanan | Type: Bug | Status: new Component: Database | Version: 1.8 layer (models, ORM) | Severity: Normal | Keywords: model class bug Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Hi Team,
I am a Django developer. Here I am using Django 1.8.5 version to develop the application. I am facing one issue with Django model class. Below is one sample model class which I am using in my application, class Subgroup(models.Model): subgroupname = models.TextField(max_length=50,null=True,blank=True) description = models.TextField(null = True,blank = True) workgroup = models.ForeignKey(Workgroup) rowstamp = models.IntegerField(null=True, blank=True) active = models.BooleanField(default=True) group_leader = models.ForeignKey(UserProfile, null=True, blank=True) def __str__(self): return self.subgroupname class Meta: verbose_name_plural = "Subgroups" The above model class is returning "Subgroup Name" as a value of that object. We have a our own admin interface area to enter this subgroup name and values for the above model class. If any invalid characters (eg:- '→' ) included in the subgroup name, Django will throw below error, while rendering this subgroup object in Django templates. == == Error message getting: == == ** encoding, errors)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2013' in position 11: ordinal not in range(128)** I think Django doesn't have any in-built error handling if any invalid characters included in the model value. I am requesting you to check this issue on priority and suggest us a solution for this Please let me know if you need any additional information Thanks & Regards Nitish Nandanan -- Ticket URL: <https://code.djangoproject.com/ticket/27519> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.17cc3796098b3479c79a6157e048fe97%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.