title: Making queries based on input via form and displaying the result
body: <p>I have generated a form which takes an input from the user, I am making a query based on the input and storing the results of the query in a variable <code>data</code>.<br /> 
  I wish to render a page(display.html) which displays the data in variable <code>data</code>.<br />
  How shall I define the url to map to display.html?<br />
  Do I need to define a separate view for display.html? If yes, how can I pass the variable <code>data</code> to the new view?<br />
  What is the correct method to achieve this?<br />
  This is my views.py file, displayform function handles the form and its input</p>
  
  <pre><code>def displayform(request,user_pk):
      user=User.objects.get(id=user_pk)
      if request.user.is_active and request.user.id==user.id:
          if request.user.is_authenticated():
              if request.POST:
                  form=InpurDateForDisplay(request.POST)
                  if form.is_valid():
                      dd=form.cleaned_data['dd']
                      mm=form.cleaned_data['mm']
                      yy=form.cleaned_data['yy']
                      data=user.link_set.filter(date=datetime.date(day=dd,month=mm,year=yy))
                      return render_to_response('app1/display.html',{'data':data,})
              else:
                  form=InpurDateForDisplay()
              return render(request,'app1/displayform.html',{'form':form,})
      else:
          return render(request,'app1/error.html')
  </code></pre>