On Mar 26, 2016, at 8:04 AM, [email protected] wrote:
> 
> I believe Django lets you access the pk field of a table (which is created 
> automatically unless you define it explicitly on your model) in multiple 
> ways: self.pk, self.id, and self.<modelname>_id. Someone correct me if I’m 
> wrong.

You can’t use <modelname>_id.  The closest is the foreign key ID.

Peter of the Norse
[email protected]



-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/C006445C-23E3-41AC-842E-7EDF52143044%40Radio1190.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to