Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango - ImportError: No module named city
    primarykey
    data
    text
    <p>Django keeps telling me this, even after recoding everything, and I cannot seem to find help on Google. Project folder is as follows:</p> <pre><code>$ tree . |-- project | |-- __init__.py | |-- __init__.pyc | |-- settings.py | |-- settings.py~ | |-- settings.pyc | |-- urls.py | |-- urls.pyc | |-- wsgi.py | `-- wsgi.pyc |-- city | |-- __init__.py | |-- __init__.pyc | |-- models.py | |-- models.pyc | |-- tests.py | `-- views.py |-- course | |-- __init__.py | |-- __init__.pyc | |-- models.py | |-- models.pyc | |-- tests.py | `-- views.py |-- manage.py |-- perk | |-- __init__.py | |-- __init__.pyc | |-- models.py | |-- models.pyc | |-- static | |-- tests.py | `-- views.py |-- preuniversity | |-- __init__.py | |-- __init__.pyc | |-- models.py | |-- models.py~ | |-- models.pyc | |-- tests.py | `-- views.py `-- user |-- __init__.py |-- __init__.pyc |-- models.py |-- models.py~ |-- models.pyc |-- tests.py `-- views.py </code></pre> <p>The structure has not been changed, neither did I modify anything except for models.py, which is:</p> <pre><code>$ cat city/models.py from django.db import models class State(models.Model): acronym = models.CharField(max_length=2) name = models.CharField(max_length=32) class City(models.Model): name = models.CharField(max_length=32) state = models.ForeignKey(State) </code></pre> <p>I'm just following Django tutorial, no more and no less, and there is no solution. I used startapp on every app (and didn't just copy&amp;paste from another) and the app names are there in settings.py.</p> <p>If I remove every reference to city (foreign keys, imports and remove from installed_apps) it complains about the next app (course).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload