title: django form fails to render_to_response
body: <p>i have a django form which generates the qrcode, the form does show up on the browser however after submitting, it does not render qr_results.html</p>
  
  <p>views.py</p>
  
  <pre><code>from django.template.loader import get_template
  from django.template import Template, Context
  from django.http import HttpResponse, Http404
  from django.shortcuts import render_to_response
  from django.core.mail import send_mail
  from django.http import HttpResponseRedirect
  from cacoos_com.qr.qr_form import QrForm
  from pygooglechart import QRChart
  
  def qr(request):
      if request.method == 'POST':
          qform = QrForm(request.POST)
          if qform.is_valid():
              qc = qform.cleaned_data
              chart = QRChart(125,125)
              chart.add_data(qc['url'])
              chart.set_ec('H', 0)
              chart.download('/opt/cacoos_com/media/qr-hello.png')
              render_to_response('qr_results.html', {'url': qc['url']})
      else:
          qform = QrForm(initial={'url': 'type your url here'})
      return render_to_response('qr_form.html', {'form': qform})
  </code></pre>
  
  <p>qr_form.py</p>
  
  <pre><code>from django import forms
  
  class QrForm(forms.Form):
      url = forms.CharField(max_length=100)
  </code></pre>
  
  <p>i have not posted the templates here but i think they ok? any idea why this could be happening....</p>
  
  <p><strong>:update</strong></p>
  
  <p>these are the two templates used..</p>
  
  <p>qr_form.py</p>
  
  <pre><code>{% extends "base.html" %}
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;QR generator&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  {% block content %}
      &lt;h3&gt;QR encoder&lt;/h3&gt;
  
      {% if form.errors %}
          &lt;p style="color: red;"&gt;
              Please Correct the error{{ form.errors|pluralize }} below.
          &lt;/p&gt;
      {% endif %}
  
      &lt;form action="" method="POST"&gt;
          &lt;div class="field"&gt;
              {{ form.url.errors }}
              &lt;label for="id_url"&gt;Url:&lt;/label&gt;
              {{ form.url }}
          &lt;/div&gt;
          &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;
  
  {% endblock %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>qr_results.html</p>
  
  <pre><code>{% extends "base.html" %}
  
  {% block content %}
  &lt;h3&gt;QR code&lt;/h3&gt;
  
  &lt;p&gt; This is the qr code for your url {{ url }} &lt;/p&gt;
  
  &lt;p&gt;&lt;img src="{{ MEDIA_URL}}/media/qr-hello.png" /"&gt;&lt;/p&gt;
  
  {% endblock %}
  </code></pre>