On Tue, Mar 22, 2011 at 5:03 PM, cootetom <coote...@gmail.com> wrote:
> Hi, I've been trying to use Postgresql because I'm thinking of using > that instead of MySQL due to it's ability to role back transactions > making it easier to use South. However I've hit a wall with it and > can't seem to fix it. > > I'm using the psycopg2 python library and have tried postgresql 8 and > now 9. > > The error, in brief, is: > > " > Template error > In template c:\python26\lib\site-packages\django\contrib\admin > \templates\admin\base.html, error at line 58 > Caught DatabaseError while rendering: current transaction is aborted, > commands ignored until end of transaction block > " > > By searching Google for this error I have found loads of discussion on > it but nothing that I have been able to apply in order to fix my > scenario. I'm getting this error when visiting the Django admin site > which is probably adding to my confusion because it's code that I'm > not able to debug. > > Has anyone else got any information on this error, or better, a > solution? If your transaction throws an error then you must explicitly rollback the transaction before you continue. This is a requirement of the SQL standard, not just a PostgreSQL issue. I can see it would be fairly hard to Google an answer for. I would guess you started a transaction and then didn't check for success on an earlier database action before continuing to issue commands. This is all normal and good. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.