title: Passing an argument to the Django ModelForm clean method
body: <p>I am trying to pass an argument to the clean method of my ModelForm so that I can perform some extra validation on some data.</p>
  
  <p>In my views.py file, I have:</p>
  
  <pre><code>page_data = page_form.cleaned_data(foo="bar")
  </code></pre>
  
  <p>In my clean_url method, I have:</p>
  
  <pre><code>def clean_url(self, **kwargs):
      url = self.cleaned_data['url']
  
      if kwargs['foo'] == url:
          query = FlatPage.objects.filter(url=url)
          if query.exists():
              raise forms.ValidationError(("This url is already being used by the '%s' page.") % (query[0].title))
  
      return url
  </code></pre>
  
  <p>I keep getting a KeyError for <code>foo</code>. I'm not sure where I'm making a mistake here, as I've passed kwarg variables before, but never to a clean method.</p>