Q:

Django -- Redirecting Views with Parameters

In the Django app I am building I would like to have the user creation process go as follows: As user signs up, if valid is then redirected to create a LIST object, and if valid is then redirected to what will be a dashboard for the LIST object just created. My views.py are as follows:
def user_signup(request):
    if request.method == 'POST':
        form = forms.UserSignupForm(data=request.POST)
        if form.is_valid():
            user = form.save()
            g = Group.objects.get(name='test_group')
            g.user_set.add(user)
            # log user in
            username = form.cleaned_data['username']
            password = form.cleaned_data['password1']
            user = authenticate(username=username, password=password)
            login(request, user)
            messages.success(request, u'Welcome to Social FollowUp')
            return redirect('user_create')
    else:
        form = forms.UserSignupForm()
    return TemplateResponse(request, 'user_signup.html', {
        'form': form,
    })

@login_required
@permission_required('')
def user_create(request):
    if request.method == 'POST':
        list_form = forms.ListForm(request.POST)
        if list_form.is_valid():
            list_create = list_form.save()
            messages.success(request, 'List {0} created'.format(list_create.list_id))
            return redirect('user_dashboard')
    else:
        list_form = forms.ListForm()

    return TemplateResponse(request, 'dashboard/create.html', {'list_form': list_form, })

def user_dashboard(request, list_id):
try:
    list_id = models.List.objects.get(pk=list_id)
except models.List.DoesNotExist:
    raise Http404
return TemplateResponse(request, 'dashboard/view.html', {'list_id': list_id})

My urls.py for these views is as follows:
url(r'user/signup/$', views.user_signup, name='user_signup'),
url(r'u/dashboard/(?P<list_id>\d+)/$', views.user_dashboard, name='user_dashboard'),
url(r'u/list/create/$', views.user_create, name='user_create'),

When I try to run through the process, the first two views work correctly. However when I redirect to the user_dashboard I get the following error:
Reverse for 'user_dashboard' with arguments '' and keyword arguments '{}' not found.

which sites this:
return redirect('user_dashboard')

I'm assuming this has something to do with me not passing in a list_id, however, even when I tried to pass in a hardcoded value it did not work (like this):
return redirect('user_dashboard', {'list_id': 2}) 

What am I doing wrong here? 

A:

Try: 
return redirect(reverse('user_dashboard', args=(2,)))

Your code
return redirect('user_dashboard')

would not work because in your url pattern, you have 
url(r'u/dashboard/(?P<list_id>\d+)/$', views.user_dashboard, name='user_dashboard'),

which requires list_id as a parameter. 

