Dear reader. Please note that as of 1 July 2014 Linfiniti.com has teamed up with Afrispatial.com to form Kartoza PTY (Ltd.). I will continue blogging about Open Source and FOSSGIS on our new web site: http://kartoza.com - we look forward to seeing you there!

Ok from that I could see that django was having trouble inserting entries into the auth_permissions table for my Clip model. The postgresql logging functions can prove indispensible when you just want to know what low level requests and responses are coming and going from your database.

jatorre

Is there no way in django to enable debug mode to see what is really doing? In rails there is. Having to look at the db logs can be a bit of pain, specially if your db server is not close by.

http://linfiniti.com Tim Sutton

Hi

Yes the above is an edge case where the database has become inconsistent with the models. In general, django has very good debugging tools – if can debug out the individual sql statements that were called to render the page you are viewing. With django logging you can add your own comments etc into the log area. And you can granularly specify which hosts are allowed to see these debug messages which appear at the end of each rendered page.

This is all done by changing a few flags in the settings.py file e.g.:

Linfiniti.com

We are mad about Free and Open Source Software and are here to help others who want to use Open Source GIS software but don't know where to start! Contact us at [email protected] if you wish to know more about the services we offer.