#34157: Error on Tutorial 2nd page: mysite/settings.py | Code is incorrect
-------------------------------------+-------------------------------------
               Reporter:  zenzenzen  |          Owner:  nobody
                   Type:             |         Status:  new
  Cleanup/optimization               |
              Component:             |        Version:  4.1
  Documentation                      |       Keywords:  tutorial,
               Severity:  Normal     |  documentation, instructions,
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 In the Database portion of the tutorial:
 [https://docs.djangoproject.com/en/4.1/intro/tutorial02/#activating-
 models], The included code to copy produces an error.
 "polls.apps.PollsConfig" at the top of the list does not work and returns
 and error. But when "polls.apps.PollsConfig" is moved to the bottom of the
 list, the makemigration polls command works as intended.

 Correct code for users to copy:
 {{{
 INSTALLED_APPS = [
     "django.contrib.admin",
     "django.contrib.auth",
     "django.contrib.contenttypes",
     "django.contrib.sessions",
     "django.contrib.messages",
     "django.contrib.staticfiles",
     **'polls.apps.PollsConfig'**
 ]
 }}}

 Incorrect Code to copy:

 {{{
 INSTALLED_APPS = [
  **'polls.apps.PollsConfig'**
     "django.contrib.admin",
     "django.contrib.auth",
     "django.contrib.contenttypes",
     "django.contrib.sessions",
     "django.contrib.messages",
     "django.contrib.staticfiles",
 ]
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34157>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018476f0d018-67d274f8-7614-431c-89e0-70e89228c762-000000%40eu-central-1.amazonses.com.

Reply via email to