Closed Bug 1480829 Opened 7 years ago Closed 7 years ago

Django Tutorial Part 9, challenge -> Github ('author' should be 'book') in book_confirm_delete.html

Categories

(developer.mozilla.org Graveyard :: General, enhancement)

All
Other
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: noah.henyon, Unassigned)

Details

(Whiteboard: [specification][type:bug])

What did you do? ================ 1. copied github code book_confirm_delete.html from 11/2016 -> catalog/templates/catalog/book_confirm_delete.html 2. and found that the "suthor" in the code should be replaced with "book" in book_confirm_delete.html 3.  What happened? ============== In the tutorial, when select a book in local library to delete to ask the user if want to delete the author, where it should ask if want to delete the specific book selected. book_confirm_delete.html: {% extends "base_generic.html" %} {% block content %} <h1>Delete Author</h1> <p>Are you sure you want to delete the author: {{ author }}?</p> <form action="" method="POST"> {% csrf_token %} <input type="submit" action="" value="Yes, delete." /> </form> {% endblock %} What should have happened? ========================== In local library during delete of a book instance, the form should ask the user if want to delete this specific book. book_confirm_delete.html: {% extends "base_generic.html" %} {% block content %} <h1>Delete Book</h1> <p>Are you sure you want to delete the book: {{ book }}?</p> <form action="" method="POST"> {% csrf_token %} <input type="submit" action="" value="Yes, delete." /> </form> {% endblock %} Is there anything else we should know? ====================================== You might want to update the tutorial challenge in Part 9 to indicate that the template should change the "author" to "book" in the template. It is correct in Github for urls.py, views.py, and book_form.html, but book_confirm_delete.html should be changed as indicated above.
There is no error in the newest 2017 version of book_confirm_delete.html. This was in reference to the 2016 version of catalog/templates/catalog/book_confirm_delete.html My mistake - as I didn't realize there was a more recent version than the 2016 version. I was using Django 1.11 LTS, and had to reference the 2016 files because they are needed for the syntax in the urls.py files which use url regex instead of path that is used for Django 2.0. The 2017 version of book_confirm_delete.html works with Django 1.11. (In reply to noah.henyon from comment #0) > What did you do? > ================ > 1. copied github code book_confirm_delete.html from 11/2016 -> > catalog/templates/catalog/book_confirm_delete.html > 2. and found that the "suthor" in the code should be replaced with "book" in > book_confirm_delete.html > 3.  > > What happened? > ============== > In the tutorial, when select a book in local library to delete to ask the > user if want to delete the author, where it should ask if want to delete the > specific book selected. > book_confirm_delete.html: > {% extends "base_generic.html" %} > {% block content %} > <h1>Delete Author</h1> > <p>Are you sure you want to delete the author: {{ author }}?</p> > <form action="" method="POST"> > {% csrf_token %} > <input type="submit" action="" value="Yes, delete." /> > </form> > {% endblock %} > > > What should have happened? > ========================== > In local library during delete of a book instance, the form should ask the > user if want to delete this specific book. > book_confirm_delete.html: > {% extends "base_generic.html" %} > {% block content %} > <h1>Delete Book</h1> > <p>Are you sure you want to delete the book: {{ book }}?</p> > <form action="" method="POST"> > {% csrf_token %} > <input type="submit" action="" value="Yes, delete." /> > </form> > {% endblock %} > > > Is there anything else we should know? > ====================================== > You might want to update the tutorial challenge in Part 9 to indicate that > the template should change the "author" to "book" in the template. It is > correct in Github for urls.py, views.py, and book_form.html, but > book_confirm_delete.html should be changed as indicated above.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.