#27106: Document which template filters can be used in Python code (and how)
------------------------------------------------+------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
The Django template language ships with a lot of filters. Usually they're
implemented as Python functions and can be imported and used in your own
code.
However this particular usage is not documented (take the example of the
various `truncate*` filters [1]).
I think it would be useful to know:
1) Which template filters can be used as functions;
2) Where to import them from and how to use them;
3) If there are limitations/gotchas related to using them.
[1]
https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#truncatechars
--
Ticket URL: <https://code.djangoproject.com/ticket/27106>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.6b16ccf31fb5a4e4a9f4304c6c78b2fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.