Opened 5 years ago

Closed 5 years ago

#11845 closed (invalid)

minor typo in code example (tutorial pt 3)

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

Description

In the mysite/urls.py code sample in http://docs.djangoproject.com/en/dev/intro/tutorial03/#design-your-urls, there's an extra comma at the end of the urlpatterns declaraion:

(r'^admin/', include(admin.site.urls)),

which causes a syntax error. Removing the comma fixes the issue.

Change History (1)

comment:1 Changed 5 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

No, the trailing comma there is not an error. It's common practice to make adding items easier since you don't have to remember to add a comma to the previous line when you add a new line. If removing it fixed a syntax error for you then there is some other error in what you've got that is causing it.

Note: See TracTickets for help on using tickets.
Back to Top