Opened 14 years ago

Closed 14 years ago

#12108 closed (invalid)

unable to execute basic insert using djangopsycopg2.ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

Reported by: mckarvin@… Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

Hi,

I am getting the following error when I try to insert a row in the table.

psycopg2.ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

The commands i am using are

>>> a = route('113','NORTH','TRUE')
>>> a.save()

The model created for route is

class route(models.Model):
    routeid           =  models.AutoField(primary_key=True)
    name              =  models.CharField(max_length = 200)
    direction         =  models.CharField(max_length = 5)
    schedulebased     =  models.BooleanField()

    def __unicode__(self):
        return self.name

The table has been created and I am able to insert value using the posgre interface. Please help me out on this problem

Change History (2)

comment:1 by Alex Gaynor, 14 years ago

Description: modified (diff)

Please use preview.

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: invalid
Status: newclosed

Trac isn't for solving general user queries - it's for fixing bugs in Django itself. This isn't a bug in Django - there are several problems with your sample code, and a postgres transaction error would be the expected response. If you want general bug-fixing advice, please ask on django-users.

Note: See TracTickets for help on using tickets.
Back to Top