I got it, thanks Joe!
url(r'^$', 'index', name='gis_wo_index'),
return HttpResponseRedirect(reverse('gis_wo_index'))
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.