title: Function expects 2 arguments when should only one
body: <p>I have a function <code>friend_exists</code> like this:</p>
  
  <pre><code>def friend_exists(request, pid):
      result = False
      try:
          user = Friend.objects.get(pid=pid)
      except Friend.DoesNotExist:
          pass  
      if user:
          result = True
  
      return result
  </code></pre>
  
  <p>I'm calling it from my other function like this:</p>
  
  <pre><code>exists = friend_exists(form.cleaned_data['pid'])
  </code></pre>
  
  <p>where <code>pid = u'12345678'</code>. Why I'm getting:</p>
  
  <pre><code>Exception Type: TypeError at /user/register/
  Exception Value: friend_exists() takes exactly 2 arguments (1 given)
  </code></pre>
  
  <p>Any ideas?</p>