Code

#20954 closed Bug (fixed)

Tutorial Doco Error

Reported by: n2cheval@… Owned by: nobody
Component: Documentation Version: 1.5
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

On the page "https://docs.djangoproject.com/en/1.5/intro/tutorial03/"
at the section "Write your first view"

It says to update the same file "polls/urls.py" twice, but with completely different code, even through it says to only add the "include".

First
from django.conf.urls import patterns, url

from polls import views

urlpatterns = patterns(,

url(r'$', views.index, name='index')

)

Second
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(,

url(r'polls/', include('polls.urls')),
url(r'
admin/', include(admin.site.urls)),

)

The "final" second version errors.

Attachments (0)

Change History (1)

comment:1 Changed 11 months ago by n2cheval@…

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

Didn't read the detail that it was the same file in different folders.

Sorry.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.