Monday, January 29, 2018

Re: Get request, has PK, how do I access the PK data with in the model

On Sunday, 28 January 2018 19:01:35 UTC, Travis Pickle wrote:
I am using django 1.8.

I read though the docs, however, i not seeing how I can get the PK other attributes to use in model searching. 

As others have stated, this is *fully* covered in the tutorial, specifically in part 3. Potted answer, though: you capture it as a URL argument and accept it in your view function. If you've read that part of the tutorial and still can't work it out, you'll need to post some actual code.
-- 
DR.

--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9bf93235-7803-47db-a1e1-eadfbbd1d875%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment