Redirect with HttpResponseRedirect to another function in python
Question: I have a function :

    
    
    def drawback(request,problem_id) 
    

and I want in the end of this function to redirect to another page that is
called from function

    
    
    def show(request,problem_id)
    

I tried with

    
    
    return HttpResponseRedirect(reverse('show',kwargs={'problem_id':10}))
    return HttpResponseRedirect(reverse('show',kwargs={'problem_id':'10'}))
    return HttpResponseRedirect(reverse('show',args=[10]))
    return HttpResponseRedirect(reverse('show',args=(10))
    

Everything I found in other sites. But I receive the error

    
    
    Exception Type:     NoReverseMatch
    Exception Value:    
    
    Reverse for 'show' with arguments '()' and keyword arguments '{'problem_id': '10'}' not found.
    

or

    
    
    Exception Value: Reverse for 'show' with arguments '(u'10',)' and keyword arguments '{}' not found.
    

This function and page works when I call it through html with a button. When I
try to redirect from drawback function is not working.

urls.py

    
    
    from django.conf.urls.defaults import *
    from views import *
    import settings
    from django.conf import settings as rootsettings
    
    urlpatterns = patterns('',
       # authentication
       (r'^start_auth', start_auth),
       (r'^after_auth', after_auth),
    
       # screens
       (r'^problems/codelookup$', code_lookup),
    
       # TESTING
       (r'^problems/test$', test_message_send),
    
       (r'^donnorsTool/$', problem_list),
       (r'^problems/delete/(?P<problem_id>[^/]+)', archived_problem),
       (r'^problems/edit/(?P<problem_id>[^/]+)', edit_problem),
    
       (r'^problems/restore/(?P<problem_id>[^/]+)', restore_problem),
       (r'^problems/new$', new_problem),
       (r'^problems/archived$', archived_problems),
       (r'^donnorsTool/show/(?P<problem_id>[^/]+)', show),
       (r'^donnorsTool/consent/(?P<problem_id>[^/]+)/(?P<counter>[^/]+)', consent),
       (r'^donnorsTool/withdraw/(?P<problem_id>[^/]+)/(?P<counter>[^/]+)', withdraw),
    
        # static
        ## WARNING NOT FOR PRODUCTION
        (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': rootsettings.SERVER_ROOT_DIR + settings.STATIC_HOME}),
    )
    


Answer: Just call it like a function :

    
    
    def drawback(request,problem_id) 
        ...
        ...
        return show(request,10)
    

