Code

Opened 6 years ago

Closed 6 years ago

#8083 closed (duplicate)

Example Code error in Django Docs for Generic Views

Reported by: lucasx Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: ljhowell@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There is an error in this piece of documentation:
http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template

The example shows the 'direct_to_template' function surrounded by 'single quotes'. However, in the book, it shows the function being called without quotes:
http://www.djangobook.com/en/1.0/chapter09/#cn12

Surrounding the direct_to_template function with quotes yields this error:
TypeError at /
'str' object is not callable

When used without quotes it works fine. Simple correction to 'djangoproject' documentation is required.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Alex

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

Closing as a dupe of #8082.

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.