#15732 closed Cleanup/optimization (fixed)
stringfilter documentation example does not work
Reported by: | Antti Kaihola | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | easy-pickings |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In stringfilter decorator documentation, the first code example given does not work because @register.filter
is missing.
Attachments (2)
Change History (7)
by , 14 years ago
Attachment: | 15732_stringfilter_doc_example_r15965.diff added |
---|
comment:1 by , 14 years ago
Keywords: | easy-pickings added |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
Changing the docs as suggested won't work because we haven't been introduced to registering filters yet (and we'd have to add that line to all of the preceding examples). Instead, flipping the sections on "Registering custom filters" and "Template filters that expect strings" would make far more sense. That way the flow of information goes from writing filters to registering them to other useful information about them.
comment:2 by , 14 years ago
Easy pickings: | set |
---|
comment:3 by , 13 years ago
I switched the sections and made the stringfilter example work. I wasn't sure if this was the place for a full example with all the includes, but wasn't sure what else to do.
by , 13 years ago
Attachment: | 15732_stringfilter_docs.diff added |
---|
comment:5 by , 13 years ago
Patch needs improvement: | unset |
---|
I removed @stringfilter
from the register doc examples too, so we're introducing one concept at a time.
Adds the missing @register.filter decorator to the @stringfilter example