Lately, we were hacking on PostgreSQL (PostGIS) triggers, and we quickly felt like debugging our code... Here is a cheap and quick way of printing out triggers variables and context through Django.
PostgreSQL server configuration
In postgresql.conf, adjust the minimum level of notice sent to the client :
client_min_messages = log …
There are comments.