title: 'unicode' object has no attribute 'get' Django beginner
body: <p>I have a very simple code in Django and I've this error which comes everytime.</p>
  
  <p>The content of the form is well saved in the model but this error shows up when I want to use reverse: <code>'unicode' object has no attribute 'get'</code></p>
  
  <p>There is my code:</p>
  
  <p>views.py:</p>
  
  <pre><code>class PastaView(View):
  
      template_name = 'pasta.html'
      form_class = PastaForm
  
      def get(self, request, *args, **kwargs):
          item = get_object_or_404(Pasta, url=kwargs['hash'])
          return render(request, self.template_name, {'pasta': item, 'form': self.form_class})
  
      def post(self, request, *args, **kwargs):
          form = self.form_class(request.POST)
          item = get_object_or_404(Pasta, url=kwargs['hash'])
          if form.is_valid():
              item.text = form.cleaned_data['text']
              item.save()
          return reverse('detail_pasta', kwargs={'hash': item.url})
  </code></pre>
  
  <p>forms.py:</p>
  
  <pre><code>class PastaForm(Form):
  
      text = forms.CharField(widget=forms.Textarea)
  </code></pre>
  
  <p>models.py:</p>
  
  <pre><code>class Pasta(models.Model):
      text = models.TextField(verbose_name='Text', blank=False, null=False)
      url = models.CharField(verbose_name='url', max_length=255, blank=False, null=False)
  
      def __unicode__(self):
          return u'%s' % self.text
  
      def save(self):
          super(Pasta, self).save()
  
          if not self.url:
              self.url = baseconvert(str(self).id, BASE10, BASE62)
              self.save()
  </code></pre>
  
  <p>Traceback</p>
  
  <pre><code>Environment:
  
  
  Request Method: POST
  Request URL: http://localhost:8000/pastabin/B/
  
  Django Version: 1.8.2
  Python Version: 2.7.6
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'pastabin')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')
  
  
  Traceback:
  File "/home/snaaail/.virtualenvs/copy_pasta/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    223.                 response = middleware_method(request, response)
  File "/home/snaaail/.virtualenvs/copy_pasta/local/lib/python2.7/site-packages/django/middleware/clickjacking.py" in process_response
    31.         if response.get('X-Frame-Options', None) is not None:
  
  Exception Type: AttributeError at /pastabin/B/
  Exception Value: 'unicode' object has no attribute 'get'
  </code></pre>
  
  <p>Thanks for helping.</p>