Hi, do you mean in the GET request, the user provides the pk (perhaps in URL) or the server sends to users an object where pk is a field?
If it's the former, then @George's answer is the right one. An example of what you are trying to achieve will be helpful. Best Zheng On Tue, Jul 21, 2020 at 1:05 AM George <methec...@gmail.com> wrote: > You use request.GET['choice_filed'] > > On Monday, July 20, 2020 at 9:14:48 AM UTC+5:30, Arpana Mehta wrote: >> >> Hi, >> I have a class with a GET and a POST request. I am sending the data ( >> with pk of the object ) in my GET request and I want the frontend to use >> that pk to refer to the exact instance of the model whenever doing any >> operation. >> >> In my POST request I am only sending the `choice field` value. How do I >> use the pk received in GET? >> >> Thanks and regards, >> Arpana Mehta >> > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/75e78c32-6736-45a0-ab66-9406dc87dc5do%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/75e78c32-6736-45a0-ab66-9406dc87dc5do%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGQ3pf9yD2GW%3DZbihCcaJWK%2BtQ%2Bodv_yVOtuhe%2Bf_YtBs8wSTQ%40mail.gmail.com.