[Answer]-How to avoid MySQL warning to be escalated to an Exception in a Django application

1👍

You can have your warning ignored with code like this somewhere before the query is executed.

from warnings import filterwarnings
import MySQLdb as Database
filterwarnings('ignore', message="^Truncated incorrect DOUBLE value:.*", 
                category = Database.Warning)

see https://docs.python.org/2/library/warnings.html for more information

Leave a comment