Changes between Initial Version and Version 1 of Ticket #27519


Ignore:
Timestamp:
Nov 21, 2016, 9:32:29 AM (8 years ago)
Author:
Tim Graham
Comment:

Hi, there's aren't sufficient details here to point to a bug in Django. It seems more likely that you've made a mistake in your application. Please use our support channels to get help and reopen the ticket with more details if that investigation reveals that Django is at fault.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27519

    • Property Resolutionneedsinfo
    • Property Status newclosed
  • Ticket #27519 – Description

    initial v1  
    44
    55Below is one sample model class which I am using in my application,
    6 
     6{{{
    77class Subgroup(models.Model):
    88    subgroupname = models.TextField(max_length=50,null=True,blank=True)
     
    1818    class Meta:
    1919        verbose_name_plural = "Subgroups"
    20 
     20}}}
    2121
    2222The 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.
    2323
    24 ==
    25 ==
    26 Error message getting:
    27 ==
    28 ==
     24Error message:
    2925
    30 **  encoding, errors)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2013' in position 11: ordinal not in range(128)**
     26`**  encoding, errors)\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2013' in position 11: ordinal not in range(128)**`
    3127
    3228I think Django doesn't have any in-built error handling if any invalid characters included in the model value.
Back to Top