Opened 14 years ago

Closed 14 years ago

#14552 closed (wontfix)

Suggestion for a slightly better explanation of custom template tags

Reported by: ranmoshe 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: no UI/UX: no

Description (last modified by Gabriel Hurley)

In http://docs.djangoproject.com/en/dev/howto/custom-template-tags/ there is a concise explanation of how to define a custom filter. It might be good to emphasize the need for an empty __init__.py file in the templatetags directory - right now it just appears in a 'suggested' directory structure, and one might just ignore it if one does not understand it's mandatory - happened to me.

Change History (1)

comment:1 by Gabriel Hurley, 14 years ago

Description: modified (diff)
Resolution: wontfix
Status: newclosed

That page already contain exactly what you're asking for under the heading Code Layout:

"If this doesn’t already exist, create it - don’t forget the __init__.py file to ensure the directory is treated as a Python package."

It is also noted in the sample directory structure. Doing more than that on this page would be redundant.

Thanks for the report, though!

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