Opened 9 years ago

Closed 9 years ago

#15614 closed (fixed)

Documentation typo

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


On this page:

When I try the example for the direct_to_template:

(r'^foo/$',             'direct_to_template', {'template': 'foo_index.html'}),

I got a str object is not callable error.

If I remove the quotes around direct_to_template it does work.

(r'^foo/$',             direct_to_template, {'template': 'foo_index.html'}),

Change History (2)

comment:1 Changed 9 years ago by Adrian Holovaty

Triage Stage: UnreviewedAccepted

Good catch. Looks like we have the same problem with redirect_to in that same document. I'm working on a fix...

comment:2 Changed 9 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

In [15822]:

Fixed #15614 -- Fixed potentially confusing URLconf examples in docs/ref/generic-views.txt by adding explicit import statement and using function passing instead of strings in the URLpattern

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