Ticket #318 (closed defect: duplicate)

Opened 5 years ago

Last modified 4 years ago

ContentTypes signals require "db" argument since Django 1.2

Reported by: andy@… Owned by: andrew
Priority: major Milestone: 0.7
Component: migrations Version: 0.7-pre
Keywords: contenttypes db Cc:


I've had this error while trying to re-create the database from scratch:

$ ./ migrate
Running migrations for my_app:
 - Migrating forwards to 0002_another_migration.
 > my_app: 0001_initial
 > my_app: 0002_another_migration
Traceback (most recent call last):
  File "./", line 13, in <module>
  File "/usr/local/lib/python2.5/site-packages/django/core/management/", line 439, in execute_manager
  File "/usr/local/lib/python2.5/site-packages/django/core/management/", line 380, in execute
  File "/usr/local/lib/python2.5/site-packages/django/core/management/", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.5/site-packages/django/core/management/", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.5/site-packages/south/management/commands/", line 92, in handle
    skip = skip,
  File "/usr/local/lib/python2.5/site-packages/south/", line 596, in migrate_app
  File "/usr/local/lib/python2.5/site-packages/south/db/", line 713, in send_pending_create_signals
    self.really_send_create_signal(app_label, list(set (model_names)))
  File "/usr/local/lib/python2.5/site-packages/south/db/", line 753, in really_send_create_signal
    verbosity=verbosity, interactive=interactive)
  File "/usr/local/lib/python2.5/site-packages/django/dispatch/", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.5/site-packages/django/contrib/contenttypes/", line 10, in update_contenttypes
    db = kwargs['db']
KeyError: 'db'

The migration does not add, delete or modify contenttypes-related fields, but the model is referenced by an external model via contenttypes. As far as I understand, South should pass the database to contenttypes' signals.


Change History

comment:1 Changed 5 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7

comment:2 Changed 5 years ago by dih0658@…

I think this was a duplicate ticket of #310 which was fixed in [28ca426eb343] and [94a9f98db5d7]

comment:3 Changed 5 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to duplicate

I agree. Closing.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.