title: How to have two arguments in a django custom filter
body: <p>I am trying to manipulate two objects for a calculation, however I am getting the error:&quot;Invalid filter&quot;</p>
  <p>In the html frontend I have a nested loop with objects: units and person as following:</p>
  <pre><code>{{units|myFilter:person}}
  </code></pre>
  <p>where units has several objects and person only has one.</p>
  <p>my filter is defined by:</p>
  <pre><code>def myFilter(units,person):
      n = 0
      for i in units:
          if i.name == person.name:
              n = n + 1
      return n
  </code></pre>
  <p>But is it not working, any ideas or suggestions please?</p>