I was able to trace the cause of the error, though not sure if this was the
cause with other people.
I loaded my data from an excel spreadsheet which copied a table from
microsoft word.

It seems that the copy from word puts some special characters in the
database.

I was able to manually type in the text with more than 200 characters and I
was able to delete the record successfully. I have put in the details for my
scenario in ticket #10523

Jeff

On Mon, Jun 14, 2010 at 11:50 AM, Karen Tracey <kmtra...@gmail.com> wrote:

> On Mon, Jun 14, 2010 at 11:39 AM, Jeff Green <jeffhg2...@gmail.com> wrote:
>
>> In one of my models, I have a CharField with Max_length of 2000
>> characters.
>> When I try to delete the record via admin, I get an error value too
>> long for type character varying(200).
>>
>> It seems that the issue is because it is trying to insert the record
>> into the django_admin_log and the change_message field is defined as a
>> TextField which has a limit of 200 characters.
>>
>> Any suggestions on how to get around this issue.
>>
>
> This has been reported before, see:
>
> http://code.djangoproject.com/ticket/10523
> http://code.djangoproject.com/ticket/10632
>
> Trouble is we can't, in general, recreate it. The code in question already
> truncates the object_repr for the log message to 200 characters, see:
>
>
> http://code.djangoproject.com/browser/django/tags/releases/1.2.1/django/contrib/admin/models.py#L14
>
> So it is a bit of a mystery why some people run into a problem where the
> repr apparently has not been cut down to a size that will fit. If you could
> trace through the code on your system where you see the problem and shed any
> light on how this is happening, that would be helpful. Alternatively if you
> could post very specific details of your model, Python version, database
> version, etc. to ticket #10523 then maybe someone will be able to recreate
> and figure out what is going on.
>
> Karen
> --
> http://tracey.org/kmt/
>
> --
>  You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to