Keep in mind that your "p" variable won't be available to your index view
on a redirect, so I'm just working on the assumption that you just posted a
small code snippet and you're actually doing something with it beforehand.

--
Joey Espinosa
Python Developer
http://about.me/joelinux
On Apr 11, 2013 7:42 PM, "Nick D" <dominguez.nicho...@gmail.com> wrote:

> 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 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.
>
>
>

-- 
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.


Reply via email to