title: django - how can I clean variable data passed by an url?
body: <p>When I'm using a form I clean field data using Django forms but how do you clean variable data that's passed by an URL? </p>
  
  <p>For example I have an URL like this: <strong>http://mywebsite.com/tags/my-tag/</strong> where <strong>my-tag</strong> is the variable that I'm passing to a function on my views.py.  </p>
  
  <p>I tried to use a Django form to clean the data but I'm getting en error saying "<strong>'TagForm' object has no attribute 'cleaned_data'</strong>". 
  I know <strong>my-form</strong> variable is reaching the <strong>tags</strong> function in the views.py since I'm able to show its content on a template so the problem is probably with the way I'm using the form. </p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def tags(request, my-tag):
      tagform = TagForm(request.GET)
      cleaned_dt = tagform.cleaned_data
      form_tag = cleaned_dt['tag']
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class TagForm(forms.Form):
      tag = forms.CharField()
  </code></pre>
  
  <p>Any ideas?</p>