views:

20

answers:

1

Hay, my model is a through a "Data truncated for column 'password' at row 1" warning. This is fine, the data does get truncated, but it get fills back in by a different function later on.

How can i get django a ignore this warning? I think it's called on the Save() method.

+1  A: 

The warning you see there is from your backend database (looks like a mySQL warning to me).

I don't really think turning database level warnings off is a good idea. You should probably make sure the data is NOT being truncated instead - Why let the system take junk data?

Bartek
I got you, the field being truncated was a "password" field which contains a very long string (hex-digested), the data WAS actually being truncated to 50 chars (as per my model), this caused MAJOR problems and took about 30 mins for me to work out why this password field wasn't being matched against a user inputted password field!
dotty

related questions