sandiegopython/test-driven-django-development

Unclear wording on section Blog Entry Detail

riseriyo opened this issue · 9 comments

Ok, this section was a bit unclear to me. So...

Suggestion: Change wording for the following:
"This test fails because we didn’t define the get_absolute_url method for our model (Django Model Instance Documentation). "
to:
"This test fails because we didn’t define the get_absolute_url method for our Entry model (Django Model Instance Documentation). "

Suggestion: Change wording for the following (*if I am correctly understanding what is supposed to be returned):
"Finally we need to create the get_absolute_url() function which should return the entry detail URL for each entry. "
to:
"Finally we need to create the get_absolute_url() function inside our class Entry which calls on the view, entry_details, in blog/views.py. This view will then return the entry detail URL for each entry."

@riseriyo I don't think your second suggestion is correct. The URL is constructed by Django's url resolver because we use django.core.urlresolvers.reverse.

@treyhunner Ok, but that section is still unclear to me in the way it was
written.

  1. Where are we creating the get_absolute_url() function? Ok, I see where
    in the next sentences down... Entry class
  2. Maybe it's the part 'entry detail URL for each entry' that's confusing
    me. Do you mean for each EntryDetail object there is a URL that corresponds
    to each entry?
  3. Could you add what you stated -- "The URL is constructed by Django's
    url resolver." and refer to the django.core.urlresolvers.reverse and what
    it does as a way of making it more clear?

On Fri, Nov 7, 2014 at 5:56 PM, Trey Hunner notifications@github.com
wrote:

@riseriyo https://github.com/riseriyo I don't think your second
suggestion is correct. The URL is constructed by Django's url resolver
because we use django.core.urlresolvers.reverse.


Reply to this email directly or view it on GitHub
#113 (comment)
.

Ms. Rise Riyo


“Named must your fear be before banish it you can.” - Yoda

  1. There's a URL for each Entry object.
  2. We should link to reverse if we don't already, but I'm not sure whether the URL resolver explanation would make things more or less confusing. I wonder how other tutorials handle explanations of reversing URLs.

@treyhunner @riseriyo I went through this section and added some readability changes. I think that I covered Trey's item 1. My recommendation would be to skip URL resolver explanation at this point.

I went through section again. Wording is better. But I think adding at
least a "Tip" regarding django.core.urlresolvers import reverse should be
added as further reading.

Placing the "Tip" under the box of code that displays the
get_absolute_url() would be fine.

Tip: For further reading about the utility function, reverse, see the
Django documentation on django.core.urlresolvers.reverse at
https://docs.djangoproject.com/en/1.7/ref/urlresolvers/

On Sun, Nov 9, 2014 at 7:36 AM, Carol Willing notifications@github.com
wrote:

@treyhunner https://github.com/treyhunner @riseriyo
https://github.com/riseriyo I went through this section and added some
readability changes. I think that I covered Trey's item 1. My
recommendation would be to skip URL resolver explanation at this point.


Reply to this email directly or view it on GitHub
#113 (comment)
.

Ms. Rise Riyo


“Named must your fear be before banish it you can.” - Yoda

@riseriyo Sounds good. I'll make the suggested change :)

@riseriyo For your viewing pleasure 955bb7e

Thanks much, Ms. Carol. - R

On Sun, Nov 9, 2014 at 11:55 AM, Carol Willing notifications@github.com
wrote:

@riseriyo https://github.com/riseriyo For your viewing pleasure 955bb7e
955bb7e


Reply to this email directly or view it on GitHub
#113 (comment)
.

Ms. Rise Riyo


“Named must your fear be before banish it you can.” - Yoda

@riseriyo You are very welcome.
@treyhunner Give it a look and then I think it is ready to close.