Opened 11 years ago
Last modified 11 years ago
#22535 closed Bug
Lookup failed for model referenced by field accounts.User.groups — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Migrations | Version: | 1.7-beta-2 |
Severity: | Normal | 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
Traceback (most recent call last):
File "local_manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "D:\projekty\myinit\env\lib\site-packages\django\core\management\init
.py", line 427, in execute_from_command_line
utility.execute()
File "D:\projekty\myinit\env\lib\site-packages\django\core\management\init
.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "D:\projekty\myinit\env\lib\site-packages\django\core\management\base.py"
, line 288, in run_from_argv
self.execute(*args, options.dict)
File "D:\projekty\myinit\env\lib\site-packages\django\core\management\base.py"
, line 337, in execute
output = self.handle(*args, options)
File "D:\projekty\myinit\env\lib\site-packages\django\core\management\commands
\makemigrations.py", line 99, in handle
changes = autodetector.changes(graph=loader.graph, trim_to_apps=app_labels o
r None)
File "D:\projekty\myinit\env\lib\site-packages\django\db\migrations\autodetect
or.py", line 33, in changes
changes = self._detect_changes()
File "D:\projekty\myinit\env\lib\site-packages\django\db\migrations\autodetect
or.py", line 50, in _detect_changes
old_apps = self.from_state.render()
File "D:\projekty\myinit\env\lib\site-packages\django\db\migrations\state.py",
line 63, in render
model=dangling_lookup[0]))
ValueError: Lookup failed for model referenced by field accounts.User.groups: au
th.Group
Printed self.apps._pending_lookups
{('auth', 'Group'): [(<class 'fake.User'>, <django.db.models.fields.related.
ManyToManyField: groups>, <function resolve_related_class at 0x039247F0>), (<cla
ss 'fake.User'>, <django.db.models.fields.related.ManyToManyField: groups>,
<function set_managed at 0x03924830>), (<class 'fake.User_groups'>, <django.
db.models.fields.related.ForeignKey: group>, <function resolve_related_class at
0x03924630>)], ('auth', 'Permission'): [(<class 'fake.User'>, <django.db.mod
els.fields.related.ManyToManyField: user_permissions>, <function resolve_related
_class at 0x03924530>), (<class 'fake.User'>, <django.db.models.fields.relat
ed.ManyToManyField: user_permissions>, <function set_managed at 0x03924570>), (<
class 'fake.User_user_permissions'>, <django.db.models.fields.related.Foreig
nKey: permission>, <function resolve_related_class at 0x039249B0>)]}
Printed dangling dangling_lookup
(('auth', 'Group'), [(<class 'fake.User'>, <django.db.models.fields.related.
ManyToManyField: groups>, <function resolve_related_class at 0x039247F0>), (<cla
ss 'fake.User'>, <django.db.models.fields.related.ManyToManyField: groups>,
<function set_managed at 0x03924830>), (<class 'fake.User_groups'>, <django.
db.models.fields.related.ForeignKey: group>, <function resolve_related_class at
0x03924630>)])