Opened 5 years ago

Closed 5 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: UI/UX:


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 5 years ago by adrian

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 5 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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