¿Cuáles son mis próximos pasos de depuración? Error interno: la transacción actual fue abortada, ignorando el comando antes de que el bloque de transacción terminara

Actualización

Pregunta:

: el problema no es la transacción anterior, sino que la base de datos no está sincronizada/migrada correctamente.
Recientemente cambié mi base de datos local a postgres, y ahora he encontrado un error interno.
Aprendí de this question que el problema puede deberse a que la transacción anterior no se ejecutó correctamente:

"This is what postgres does when a query produces an error and you try to run another query without first rolling back the transaction."


Sin embargo, desde el siguiente registro, la primera consulta, DEBUG (0.0001), parece funcionar bien (también probé la consulta exacta a través de la Shell Django DB):
DEBUG (0.001) SELECT "django_site"."id", "django_site"."domain", "django_site"."name" 
FROM "django_site" WHERE "django_site"."id" = 12 ; args=(12,)

Registro SQL completo

DEBUG (0.001) SELECT "django_site"."id", "django_site"."domain", "django_site"."name" FROM "django_site" WHERE "django_site"."id" = 12 ; args=(12,)
DEBUG (0.003) INSERT INTO "application_app" ("applied_date", "fname", "lname", 
    "email_address", "phone_number", "skype_id", "applied_track", "college1",       
    "field_of_study1", "graduation_month1", "graduation_year1", "degree1",
    "degree_other1", "working_during_program", "explain_working_during_program", 
    "sib_goal", "twitter_link", "linkedin_link", "other_social_link1",
    "other_social_link2", "other_social_link3", "applied_class", "applied_location",
    "referral", "colossal_failure", "next_week_year_10year", "you_created",
    "your_inspiration", "dev_years_of_exp", "dev_fav_lang", "dev_fav_lang_why",
    "dev_link_youve_built", "dev_link_github", "dev_fav_resource", "prod_cool_prod",     
    "prod_fav_designer", "prod_portfolio", "prod_bad_design", "prod_link_dribble", 
    "mark_ind_trend", "mark_email_to_coworkers", "mark_keep_em_happy",
    "mark_article_or_blog", "sales_why_you", "sales_convince_restaurant",
    "sales_hardest_door", "sales_sale_within_the_year", "housing_needed",
    "program_payment", "any_last_requests") VALUES ('2013-04-20 13:22:06.565691+00:00',
    'Brian', 'Dant', '[email protected]', '', '', 'MAR', '', '', 1, NULL, '', '', false,   
    '', 'GN', '', 'http://linkedin.com/', '', '', '', 'NYCSUM13', '', 'test', 'test',
    'test', 'test', 'test', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 
    '', '', '', '', false, 'UF', 'test') RETURNING "application_app"."id"; args=(u'2013-04-20 13:22:06.565691+00:00',
    u'Brian', u'Dant', u'[email protected]', u'', u'', u'MAR', u'', u'', 1, None, '', u'', 
    False, u'', u'GN', u'', u'http://linkedin.com/', u'', u'', '', u'NYCSUM13', '', 
    u'test', u'test', u'test', u'test', u'test', '', '', u'', u'', u'', u'', u'', '', 
    u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', False, u'UF', u'test')
ERROR Internal Server Error: /
Traceback (most recent call last):
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/Users/chaz/dev/projects/startupinstitute.com/apps/application/views.py", line 22, in application
    new_app = f.save()
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/forms/models.py", line 364, in save
    fail_message, commit, construct=False)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/forms/models.py", line 86, in save_instance
    instance.save()
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 912, in execute_sql
    cursor.execute(sql, params)
  File "/Users/chaz/dev/envs/startupinstitute.com/lib/python2.7/site-packages/debug_toolbar/utils/tracking/db.py", line 153, in execute
    'iso_level': conn.isolation_level,
InternalError: current transaction is aborted, commands ignored until end of transaction block

[20/Apr/2013 08:22:06] "POST / HTTP/1.1" 500 413131
DEBUG (0.002) SELECT "django_site"."id", "django_site"."domain", "django_site"."name" FROM "django_site" WHERE "django_site"."id" = 12 ; args=(12,)
WARNING Not Found: /favicon.ico

Opinión. Py:


El problema con
def application(request):
    if request.method == 'POST':
        f = forms.AppForm(request.POST)
        selected_track = request.POST['applied_track']
        if f.is_valid():
            new_app = f.save() 
            new_app.save()

Detalles de la solución

es que mi base de datos no se ha migrado correctamente. Obviamente, este error puede provenir de (al menos) una transacción anterior, o b) la base de datos no fue sincronizada correctamente por South.