Django

Code

Ticket #962 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] Filter registration decorator is missing a return statement

Reported by: django@kieranholland.com Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

See attached patch against r1496.

Attachments

register_filter_fix_r1496.diff (0.6 kB) - added by django@kieranholland.com on 11/29/05 17:46:01.
Patch for glitch in filter registration decorator

Change History

11/29/05 17:46:01 changed by django@kieranholland.com

  • attachment register_filter_fix_r1496.diff added.

Patch for glitch in filter registration decorator

11/29/05 18:06:00 changed by adrian

Hmmm, why do the default filters all work?

11/29/05 18:08:57 changed by adrian

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

(In [1497]) Fixed #962 -- Gave filter-registration decorator a return statement. Thanks, Kieran

11/29/05 20:01:44 changed by rjwittams.

The return is pointless - the exact bit of code you've got to is a case that couldn't be a decorator.

11/29/05 20:14:09 changed by django@kieranholland.com

@register.filter('foo')
def bar(value):
    print value

This code will add the filter 'foo' to the filters library but 'bar' in the defining module will be None because the decorator gave no return value.

Hey, where'd my function go?


Add/Change #962 ([patch] Filter registration decorator is missing a return statement)




Change Properties
Action