title: Passing variables to custom Django template tags
body: <p>I'm adding an autocomplete feature to my django application.     </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
              var a = {% get_fields_task_name %}
              $( "#auto_task_name" ).autocomplete({
                source: a           
              });
  </code></pre>
  
  <p>view</p>
  
  <pre><code>def get_fields_task_name():    
      task = Task.objects.all()    
      output = []
  
      for e in task:
          output.append(e.name)
  
      x = json.dumps(output)
      return x
  get_fields_task_name = register.simple_tag(get_fields_task_name)
  </code></pre>
  
  <p>I need to pass parameters to <code>get_fields_task_name</code>, how can I do this in the template instead of <code>{% get_fields_task_name %}</code>?</p>