title: NoReverseMatch Defining keyword arguments in reverse not working
body: <p>I have two Django views, one that loads a formset and one that submits it. This is to avoid form resubmission or having to change to a different view after POST. And after submit I redirect back to the view that loads the formsets. But I can't get the URLs/reverse to work.</p>
  
  <p>Here are my views and URLs</p>
  
  <pre><code>def view(request, model1_id):
  
      #load formsets
  
      #pass information to submit view
      request.session['model1_session'] = int(model1_id)
  
      return render(request, 'app/view.html')
  
  def view_submit(request):
      #get the session
      model1_object = request.session.get('model1_session')
      ...
      if request.method == 'POST':
          #save formset
          #error!!!!
          return HttpResponseRedirect(reverse("app:view", kwargs={"model1_id":  "model1_object"}))
  
  
  url(r'^(?P&lt;model1_id&gt;[0-9]+)/model1/something/$', views.view, name='view' ),
  url(r'^model1/something/submit/$', views.view_submit, name='view_submit' ),
  </code></pre>
  
  <p>But when I press submit, everything saves just fine, but the reverse doesn't work....</p>
  
  <pre><code>Internal Server Error: /app/model1/something/submit/
  Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
      response = self.process_exception_by_middleware(e, request)
    File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/Users/username/Documents/Database/project/app/views.py", line 412, in view_submit
      return HttpResponseRedirect(reverse("app:view", kwargs={"model1_id":  "model1_object"}))
    File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 600, in reverse
      return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
    File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py", line 508, in _reverse_with_prefix
      (lookup_view_s, args, kwargs, len(patterns), patterns))
  NoReverseMatch: Reverse for 'view' with arguments '()' and keyword arguments '{'model1_id': 'model1_object'}' not found. 1 pattern(s) tried: [u'app/(?P&lt;model1_id&gt;[0-9]+)/model1/something/$']
  </code></pre>
  
  <p>I don't understand why it won't take the kwargs?</p>
  
  <pre><code>class Model1(models.Model):
  
      ...
  
      def __str__(self):
          return unicode(self.id) or u''
  
      def get_absolute_url(self):
          #I think this is the problem... but I don't know how to solve it...
          return reverse('app:view', kwargs={'id': self.id})
  </code></pre>
  
  <p>...Help...</p>