Django

Code

Ticket #959 (closed: invalid)

Opened 3 years ago

Last modified 2 years ago

[patch]Template improvements

Reported by: rjwittams Assigned to: adrian
Milestone: Component: Template system
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

  • Multiple args for filters,comma separated including varargs . Changed removetags filter to use it and put the old version in old_filters template library for people who do not want to fix all thier templates. You can load it in templates, or use template.add_to_builtins('django.template_tags.old_filters') in your settings file to apply it universally. Are there any other filters that should use it?
  • Integers and float literals in resolve_variable . I didn't know what the this should mean for 'add' and the like, so left as is.
  • Fixed standalone template tests to work with the testapp - so all tests pass in all situations.
  • Added a 'lookup' filter, useful now vars work in templates. {{my_dict|lookup:my_index}} for example - a common mailing list request.

Attachments

filters-multi-args.patch (14.1 kB) - added by rjwittams on 11/28/05 19:36:06.
filters-multi-args.diff (14.3 kB) - added by rjwittams on 11/29/05 10:03:19.
update

Change History

11/28/05 19:36:06 changed by rjwittams

  • attachment filters-multi-args.patch added.

11/28/05 19:38:34 changed by rjwittams

I messed around with formatfilesize as well. Not sure about that bit to be honest.

11/29/05 10:03:19 changed by rjwittams

  • attachment filters-multi-args.diff added.

update

11/29/05 10:04:09 changed by rjwittams

Removetags will now work either way, so no need for old_filters.

12/11/05 16:46:22 changed by rjwittams

  • component changed from Admin interface to Template system.

12/15/05 23:33:25 changed by adrian

(In [1690]) Changed resolve_variable to resolve integers and floats as integers and floats. Added ifequal unit tests. Refs #959

02/27/06 17:49:11 changed by jacob

  • status changed from new to closed.
  • resolution set to invalid.

This is too much of a laundry-list for a single ticket (and I suspect that some of this stuff is different at this point). Please re-open individual tickets if any still apply.


Add/Change #959 ([patch]Template improvements)




Change Properties
Action