from object has no attribute 'cleaned_data'
I am trying to generate a from using djnago documentation. I continouly getting the error

    'TestForm' object has no attribute 'cleaned_data' , even though form.is_valid is True(it prints 'form is valid' line of my code).Please help me ,follwing is trhe portion of my code

urls.py

    url(r'^test/',views.test),

forms.py

    from django import forms
    class TestForm(forms.Form):
        name = forms.CharField()

views.py

    def test(request):
        if request.method == 'POST':
            form = TestForm(request.POST)
            if form.is_valid:
                print 'form is valid'
                print form.cleaned_data                       
            else:
                print 'form not valid'
        else:
             form = TestForm()
        
        return render_to_response('User/Test.html',{'form': form},context_instance=RequestContext(request))

Test.html

    <form action="" method="post">{% csrf_token %}
            <table>
                {{ form.as_table }}
            </table>
            <input type="submit" value="Submit">
        </form>

from object has no attribute 'cleaned_data'
===

I am trying to generate a from using djnago documentation. I continouly getting the error

    'TestForm' object has no attribute 'cleaned_data' , even though form.is_valid is True(it prints 'form is valid' line of my code).Please help me ,follwing is trhe portion of my code

urls.py

    url(r'^test/',views.test),

forms.py

    from django import forms
    class TestForm(forms.Form):
        name = forms.CharField()

views.py

    def test(request):
        if request.method == 'POST':
            form = TestForm(request.POST)
            if form.is_valid:
                print 'form is valid'
                print form.cleaned_data                       
            else:
                print 'form not valid'
        else:
             form = TestForm()
        
        return render_to_response('User/Test.html',{'form': form},context_instance=RequestContext(request))

Test.html

    <form action="" method="post">{% csrf_token %}
            <table>
                {{ form.as_table }}
            </table>
            <input type="submit" value="Submit">
        </form>
