Saturday, March 26, 2016

Django tutorial part 3 - question_id vs question.id

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 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/53611858-55d3-4159-9f76-118af5b919df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment