Problems following tutorials on django 1.9.2

98 views
Skip to first unread message

gu99...@student.chalmers.se

unread,
Apr 24, 2016, 10:13:20 AM4/24/16
to Django users
In part 2 of the django tutorial; 'writing your fist app', the command

python manage.py makemigrations polls

gives errors. I get "ImportError: No module named polls.apps". When going back to part 1, the command 'python manage.py startapp polls' is supposed to generate also a file named apps.py in the polls/ directory, but for some strange reason it failed to do so. Since those generated .py files are mostly empty, I did "touch .../polls/apps.py" and reran that "makemigration" command above. But then I got the error message: 

ImportError: No module named PollsConfig

What now? The tutorial doesn't explain.

Tim Graham

unread,
Apr 24, 2016, 12:25:57 PM4/24/16
to Django users
Please double check your Django version with:

python manage.py --version

If you generated the polls app using a version older than 1.9, you won't have apps.py. In that case, you use simply use 'polls' in INSTALLED_APPS rather than 'polls.apps.PollsConfig'.

By the way, please use Django 1.9.5 rather than 1.9.2. You should always use the latest minor release in a series to receive important security and bug fixes.

gu99...@student.chalmers.se

unread,
Apr 25, 2016, 6:35:30 AM4/25/16
to Django users
Yes, I discovered the problem. When I first installed django, I chose the latest stable version assuming that the latest version would be Django 1.9. Then, once I learned how to check version I realized that the version installed was 1.8.9. So I had to manually unmask the "unstable" version of django and "emerge" it into my system. This was done in the middle of the tutorial. So I started over on the first tutorial and the problems disappeared.

I will try to upgrade to 1.9.5.
Reply all
Reply to author
Forward
0 new messages