Question: **views.py:**

```
def demo(request, **kwargs):
    print response
    ......

def test(request):
    ......
    kwargs = {'response': response}
    return redirect('demo', **kwargs)

```

**urls.py:**

```
from django.conf.urls import patterns, url
from django.contrib.sitemaps.views import sitemap

urlpatterns = patterns('clients.views',
    url(r'^test/', 'test', name='test'),
    url(r'^demo/', 'demo', name='demo'),

)

```

Why I have this error:

> 
> NoReverseMatch at /test/
> 
> 
> Reverse for 'demo' with arguments '()' and keyword arguments
> '{'response': {u'status': u'ok'}}' not found.
> 
> 
> Request Method: POST Request URL: http ://127.0.0.1:8000/test/
> 
> 
>

Answer: 
When using the `redirect()` shortcut you're actually doing a `HttpResponseRedirect()` and therefore need *not* to include the response in your `kwargs`.

Furthermore if you would like to redirect with keyworded arguments then the call would be 

```
redirect('/myurl/', momma="im comin' home")

```

or

```
redirect('/myurl/', kwargs={'loads_a_kwargs':'cowboy'})

```

The error you're getting is because your regexp `url(r'^demo/', 'demo', name='demo')` *does not* accept any parameters. Also, normally you would end all your url regexes with `$` to denote that the capturing should stop.
When you say `redirect('demo', **kwargs)`, internally its trying to find the urlpattern `demo/(?P<response>\d+)`. Actually it could be either `\d+` or `\w+` or whatever. But you don't have this urlpattern defined and so its failing.

So, it will pass if you define such url pattern. But another problem with your code is that `response` in `kwargs` is a dictionary and there is no way you can capture a dictionary in the url pattern.

Any particular reason you want to redirect to demo along with `status` code?