Thank you,
derrick
--
Ticket URL: <https://code.djangoproject.com/ticket/20952>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
At that point in the tutorial, we've only stubbed out the views with
something like `return HttpResponse("You're looking at poll %s." %
poll_id)` -- there's no database operation yet. It sounds like you're
following the tutorial out of order.
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:1>
Comment (by diek@…):
Good Morning,
I did not follow them out of order. If you look at tut 3, for 1.5. This is
an exact quote from Part 3, Writing more views: "Take a look in your
browser, at “/polls/34/”. It’ll run the detail() method and display
whatever ID you provide in the URL. Try “/polls/34/results/” and
“/polls/34/vote/” too – these will display the placeholder results and
voting pages."
I imagine you are volunteer, but I have to say closing my topic without
giving a chance to explain was a bit premature.
derrick
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:2>
* status: closed => new
* resolution: worksforme =>
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:3>
Comment (by timo):
It will display a placeholder page, won't it? There isn't any fetching
from the database in the views that have been implemented thus far:
{{{
def detail(request, poll_id):
return HttpResponse("You're looking at poll %s." % poll_id)
def results(request, poll_id):
return HttpResponse("You're looking at the results of poll %s." %
poll_id)
def vote(request, poll_id):
return HttpResponse("You're voting on poll %s." % poll_id)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:4>
Comment (by diek@…):
timo,
From the tutorial https://docs.djangoproject.com/en/1.5/intro/tutorial03/,
right after what you have written it states:
"Take a look in your browser, at “/polls/34/”. It’ll run the detail()
method and display whatever ID you provide in the URL. Try
“/polls/34/results/” and “/polls/34/vote/” too – these will display the
placeholder results and voting pages." '''This fails because there is no
record 34.''' There is a record 1, and as I discovered it works with
polls/1/. Here is my concern, you are an expert but someone like myself is
brand new to django. When I read a tutorial I follow it step by step. As a
beginner I have to trust a tutorial, that has been written and edited
several times; when I get an error, I do not doubt the tutorial and I
think I did something incorrect. The topic is slightly complicated as
well, so I do not understand why the tutorial would use record 34, all it
did is cause confusion. And really I cannot understand why you would not
remove 34, or explain that you need to use an existing id. Again please
try to look at this from a new learner's perspective and not an expert.
Thank you,
derrick
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:5>
Comment (by timo):
There shouldn't be a failure because the views (up to this point) simply
display whatever ID you pass in the URL. The code does not verify that a
poll with the given ID actually exists. Please tell me if I'm wrong.
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:6>
Comment (by diek@…):
timo,
Ohhh man do I feel dumb. I just checked it again. You are correct, it
works perfectly with 34. Obviously I was doing something wrong.
My apologies. I will reread Part 3 again, I am obviously not understanding
it as well as I should.
derrick
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:7>
* status: new => closed
* resolution: => worksforme
Comment:
No problem, sorry it took me so long to convey my point. If you have any
other suggestions, don't hesitate to let us know.
--
Ticket URL: <https://code.djangoproject.com/ticket/20952#comment:8>