Opened 15 years ago
Closed 15 years ago
#11845 closed (invalid)
minor typo in code example (tutorial pt 3)
Reported by: | James Rutherford | 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: | no | UI/UX: | no |
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.
Note:
See TracTickets
for help on using tickets.
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.