Tuesday, May 25, 2021

Re: How HttpResponseRedirect works

Hi!!! usually HttpResponseRedirects work with reverse
function...something like this
def myview(request):
return HttpResponseRedirect(reverse('arch-summary', args=[1945]))
where 'arch-summary' is the path name and args=[1945] the args it expects...
You need to modify also your urls.py to add tyhe name argument to your url...
Greetings

2021-05-25 0:57 GMT-04:00, Bhanu prasad Ch <bp3545486@gmail.com>:
> Hello everyone,
> Please help me out in understanding how to pass the redirected view
> with some arguments like userid to connect the URLs in Django
> [image: Screenshot_2.png][image: Screenshot_3.png]
> When I am doing this way it is redirecting to the self page that is login.
> But I need the
> HttpResponseRedirect to redirect to the progress.
>
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2ebc28b3-0e99-4ace-9868-aad10564a172n%40googlegroups.com.
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAObPVPBo%2Bsx5O64z3mtDcdi0HmDP%2BHijZEznM7FMFDQ5gTG2CA%40mail.gmail.com.

No comments:

Post a Comment