Code

Opened 4 years ago

Closed 4 years ago

#15038 closed (duplicate)

Error

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

Description

Hi guys, i have spent hours looking for the solution and i think the documentation is wrong.
my code wasn't working and now it is after i did the fix.

urlpatterns = patterns(,

('$', 'direct_to_template', { 'template': 'abc.html' }),
(r'
polls/$', 'polls.views.index'),

)

The code above does not work because the docs say to me put 'direct_to_template', with '" , and not direct_to_template without it.
The doc url: http://docs.djangoproject.com/en/1.2/ref/generic-views/

After hours i found the correct solution in the djangobook. There they say the right thing, put direct_to_template without :
http://www.djangobook.com/en/1.0/chapter09/

Thanks and hope to help with that.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by lrekucki

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

Duplicate of #15037.

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.