Here's my urlconf for the index: url(r'^$', 'index'), So how should I call it in the reverse function? If I try the reverse function without the args I get the following error: Reverse for 'gis_wo_app.views.index' with arguments '()' and keyword arguments '{}' not found.
On Thursday, April 11, 2013 4:31:26 PM UTC-7, Nick D wrote: > I'm trying to use the reverse() function to get back to my index, but I'm > not sure if my view are compatible. My index funtion takes a request ( def > index(request)). I can't seem to call the reverse function with the request > object in the args, but if I call the reverse function without any args it > doesn't find a matching function. I'm sure I'm doing something wrong! > > def index(request): > latest_wo_list = GIS_WO.objects.all().order_by('-update_timestamp')[:5] > return render_to_response('GIS_WO_APP/index.html', {'latest_wo_list': > latest_wo_list}) > > def giswo_submit(request, id): > p = get_object_or_404(GIS_WO, pk=id) > return HttpResponseRedirect(reverse('gis_wo_app.views.index', > args=(request))) > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.