Modify ↓
Ticket #318 (closed defect: duplicate)
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: |
Description
I've had this error while trying to re-create the database from scratch:
$ ./manage.py 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 "./manage.py", line 13, in <module>
execute_manager(settings_wrapper)
File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 439, in execute_manager
utility.execute()
File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 380, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 222, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.5/site-packages/south/management/commands/migrate.py", line 92, in handle
skip = skip,
File "/usr/local/lib/python2.5/site-packages/south/migration.py", line 596, in migrate_app
db.send_pending_create_signals()
File "/usr/local/lib/python2.5/site-packages/south/db/generic.py", 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/generic.py", line 753, in really_send_create_signal
verbosity=verbosity, interactive=interactive)
File "/usr/local/lib/python2.5/site-packages/django/dispatch/dispatcher.py", line 166, in send
response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.5/site-packages/django/contrib/contenttypes/management.py", 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.
Attachments
Change History
comment:2 Changed 3 years ago by dih0658@…
I think this was a duplicate ticket of #310 which was fixed in [28ca426eb343] and [94a9f98db5d7]
Note: See
TracTickets for help on using
tickets.
