python - Django migrate command fails with foreign key to user model -


I have a very simple test application, in test_app, there is only one model in the degego 1.7b2:

models.py

  username = Modlkarengki (settings.AUTH_USER_MODEL)  

When I run python manage.py makemigrations test_app , I get no error and the migration file is created successfully, however, when I python manage Py migrate So programming would come running, get me the following error:

  task to task: Synchronize unmigrated Apps admin, content type, authentication, session to implement all migration: test_app Synchronizing apps without auth migration: Creating tables ... Installing custom SQL ... Installing index ... Running migration: test_app.0001_initial ... Traceback (Most recent call final) Programmed to implement managed file ".py", line 10, & lt; Module & gt; Execute_from_command_line (sys.argv) file "C: \ Python27 \ lib \ site-packages \ django \ core \ management \ __ init__.py", line 427, execute_from_command_line utility.execute () file to "C: \ Python27 \ lib \ Site -Package \ django \ core \ management \ __ init__.py ", line 419, self.fetch_command (sub-command) exec.run_from_argv (self.argv) execute the file" C: \ Python27 \ lib \ site-packages \ django \ Core \ Management \ Base.py ", line 288, run_from_argv self.execute (* args, ** options .__ in dict__) The file" C: \ Python27 \ lib \ site-packages \ django \ core \ management \ base.py ", Line 337, executed output = self.handle (* args, ** option) in the file" C: \ Python 27 \ lib \ site-packages \ django \ core \ management \ commands \ migrate ".py", line 145, in the handle executable.Magrate (target, scheme, duplicate = options.get ("fake", incorrect)) file "C: \ Python27 \ lib \ site-packages \ django \ db \ migrations \ executor (Migration, duplicate = mock) file "C: \ python 27 \ lib \ site-packages \ django \ db \ migrations \ executor.py", line 8 8, ".py", line 60, self-disabled migration If apply_migration self.detect_soft_applied (migration): file "C: \ Python27 \ lib \ site-packages \ django \ db \ migrations \ executor.py", line 13 2, detect_soft_applied apps = project_state.render () file in the "C : \ Python27 \ lib \ site-packages \ django \ db \ migrations \ state.py ", the png In 63, render models = dangling_lookup [0])) ValueError: Lookup failed for model referenced by auth.Permission.content_. Type: contenttypes.contentType  

What am I doing wrong?

This is apparently a known bug and is being tracked in a demo ticket


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -