﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3910	DataError (Data too long for column) in admin caused by html entities overflowing db field size	miguel.carboni@…	nobody	"Hi! First of all, django is great.
I have found the following Model:

{{{
#!python
class Story(models.Model):
	autor = models.CharField(maxlength=50)
	titulo = models.CharField(maxlength=100)
	texto = models.CharField(maxlength=200)

	def __str__(self):
		return self.titulo

	class Admin:
		list_filter = ['autor']
		list_display = ['titulo', 'autor' ]
}}}

The model is trivial, it's not the actual.
The problem I found is that if I type í or á in the ""titulo"" textfield within the admin and save I got the following screen:

{{{
DataError at /admin/polls/story/2/
(1406, ""Data too long for column 'message' at row 1"")
Request Method: POST 
Request URL: http://localhost:8000/admin/polls/story/2/ 
Exception Type: DataError 
Exception Value: (1406, ""Data too long for column 'message' at row 1"") 
Exception Location: c:\python25\lib\site-packages\MySQL_python-1.2.2-py2.5-win32.egg\MySQLdb\connections.py in defaulterrorhandler, line 35 
}}}

It depends on the size of the ""titulo"", I guess the problem is that when it serialize ""í"" it turns into ""&iacute;"" then thes size of the verchar gets bigger than the original.

Regards!
Miguel S. Carboni
//developer"		new	Admin interface	0.96			admin, DataError		Accepted	0	0	0	0	0	0
