Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#10053 closed (fixed)

Incorrect pydoc in django.template.loaders.app_directories.load_template_source

Reported by: kylev Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The pydoc for this code is misleading:

"""
Wrapper for loading templates from "template" directories in INSTALLED_APPS
packages.
"""

In fact, the code builds the template path thusly:

template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates')

Please fix the pydoc to say "templates/" as it will reduce frustration a little when building self-contained apps. It might also be useful to mention in tutorials that this functionality is in place by default, since it alleviates the need to fiddle with the project-wide TEMPLATE_DIRS setting.

Attachments (1)

django-templates-doc.patch (437 bytes ) - added by kylev 15 years ago.
The most exciting patch you'll ever see.

Download all attachments as: .zip

Change History (5)

by kylev, 15 years ago

Attachment: django-templates-doc.patch added

The most exciting patch you'll ever see.

comment:1 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Eric Holscher, 15 years ago

Component: Template systemDocumentation
Triage Stage: AcceptedReady for checkin

comment:3 by Jacob, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in [10358].

comment:4 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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