Opened 9 years ago

Closed 9 years ago

#26525 closed Uncategorized (worksforme)

Tutorial02 document issue

Reported by: edwardspbe Owned by: nobody
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

I believe there is an issue with Writing your first Django app, part 2. The directions for adding polls is incorrect.

Edit the mysite/settings.py file again, and change the INSTALLED_APPS setting to include the string polls.apps.PollsConfig. It’ll look like this:

mysite/settings.py
INSTALLED_APPS = [
    'polls.apps.PollsConfig',

This should read;

Edit the mysite/settings.py file again, and change the INSTALLED_APPS setting to include the string polls. It’ll look like this:

mysite/settings.py
INSTALLED_APPS = [
    'polls',

If not, the following instructions to execute;

 python manage.py makemigrations polls

will fail with the error

ImportError: No module named apps

Change History (2)

comment:1 by Nicolas Noé, 9 years ago

Hmm, that seems to work for me.

But using just polls seems like the old way to activate an app, prior to App loading refcator in Django 1.7: https://docs.djangoproject.com/en/1.9/releases/1.7/#app-loading-refactor.

Since you refer to the Django 1.9 tutorial, may I ask you to check which version is running with:

$ python -c "import django; print(django.get_version())"

Thanks!

comment:2 by Tim Graham, 9 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top