Re: Django tutorial part 3 - question_id vs question.id

2016-04-16 Thread Peter of the Norse
On Mar 26, 2016, at 8:04 AM, jorrit...@gmail.com 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._id. Someone correct me if I’m > wrong. You can’t

Re: Django tutorial part 3 - question_id vs question.id

2016-04-06 Thread Acetone
This is awesome, and I appreciate the time you spent writing it. Besides just answering the question I had, this also helped me make some new connections around OOO topics. Also, I do not intend to use the question id as a numbering system - I was just trying to access the id for its own sake

Re: Django tutorial part 3 - question_id vs question.id

2016-03-27 Thread James Schneider
> > In trying to update my templates after I successfully finished part 3 of > the tutorial, I found that I could write something like > You're looking at the results of question {{ question.id }}: "{{ > question.question_text }}" > and get: You're looking at the results of question 1: "What's up?"

Re: Django tutorial part 3 - question_id vs question.id

2016-03-26 Thread Acetone
Cool, I can try those to see how it works. Thank you. On Saturday, March 26, 2016 at 7:04:13 AM UTC-7, jorr...@gmail.com 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.

Django tutorial part 3 - question_id vs question.id

2016-03-26 Thread jorrit787
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._id. Someone correct me if I'm wrong. -- You received this message because you are subscribed to the Google Groups

Django tutorial part 3 - question_id vs question.id

2016-03-26 Thread Acetone
Hello, In trying to update my templates after I successfully finished part 3 of the tutorial, I found that I could write something like You're looking at the results of question {{ question.id }}: "{{ question.question_text }}" and get: You're looking at the results of question 1: "What's up?"