Ticket: https://code.djangoproject.com/ticket/35461
Total options proposed by participants:
- Option A - Add the body tag in earlier pages
- Discarded: I don’t think anyone wants to add repetitive noise.
- Option A.2 - A step using template inheritance
- Discarded: Template inheritance has its own tutorial and it’s already ‘experienced’ in tutorial step 7.
- Option B - Use a different addon as example
- Discarded: The debug toolbar is a great first addon but please suggest which one you’d think is better.
- Option C - Suggest looking at the toolbar in /admin and explain what needs tweaking for it to work in /polls.
Discussion timeline:
- Dawbert (Reporter) says: Following the tutorial gives wrong results when installing django-debug-toolbar as templates need to be wrapped in complete HTML but the tutorial doesn’t do it for brevity. Proposing options A and B
- Sarah agrees Django documentation needs tweaking. Mentions the body tag requirement is already documented in the official django-toolbar app.
- Timothy offers options A, A.2 and C
My own conclusion
<aside>
💡 It’s worth doing option C.
Reasons:
- The main goal of this section is to learn how to add a package in the first place and a bit of django-debug-toolbar in second place. Option C provides both quickly in
/admin
, additionally providing a pointer on how to see such toolbar in /polls
- Most people following this tutorial will trip on this step for many reasons* and it’s worth improving this. It’s a silly thing that just gets you when you’re learning Django.
My proposed change: ‣
</aside>
*many reasons:
- It’s true that in django-toolbar app under “Tips” there’s a mention to needing a closing </body> tag but it’s in a sub/section of the docs and easy to miss when following the Django tutorial.
- It’s true that in step 3 of the Django tutorial, there’s a note saying that projects should use complete HTML but most people following this tutorial won’t add it for many reasons:
- They’re already digesting other details about Django.
- It doesn’t seem relevant in step 3, the app works well without it and they’d forgotten by step 8.