#34499: In tutorial part08, Django debug toolbar shows up in admin site but not 
in
public site
-------------------------------------+-------------------------------------
     Reporter:  lucaremdev           |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  4.2
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by lucaremdev:

Old description:

> If you are a newbie like me and follow exactly the django tutorial, when
> you get to [https://docs.djangoproject.com/en/4.2/intro/tutorial08/ part
> 8], then you don't understand why Django debug toolbar shows up in admin
> site (http://127.0.0.1:8000/admin/) but not in public site
> (http://127.0.0.1:8000/polls/).
> As mentioned on django discord
> [https://discord.com/channels/856567261900832808/856567261900832811/1096783278154985572
> here], the solution consists in making each template a full HTML document
> with a body element for the debug toolbar to show up in the public site
> as well.
>
> So, you could either show full HTML documents with body elements from the
> beginning in the tutorial,
> or
> in [https://docs.djangoproject.com/en/4.2/intro/tutorial08/#installing-
> django-debug-toolbar this part of the tutorial], after the sentence
> ''"Once installed, you should be able to see the DjDT “handle” on the
> right side of the browser window when you refresh the polls
> application."'', you could add something like: ''"note that for the
> django debug toolbar to show up correctly, you should properly make each
> template a full HTML document, as we mentioned it to be best practice
> earlier"''.
>
> These are just suggestions of course! Do as it seems better for the whole
> community!
> And thank you anyway =)

New description:

 If you are a newbie like me and follow exactly the django tutorial, when
 you get to [https://docs.djangoproject.com/en/4.2/intro/tutorial08/ part
 8], then you don't understand why Django debug toolbar shows up in admin
 site (http://127.0.0.1:8000/admin/) but not in public site
 (http://127.0.0.1:8000/polls/).
 As mentioned on django discord
 
[https://discord.com/channels/856567261900832808/856567261900832811/1096783278154985572
 here], the solution consists in making each template a full HTML document
 with a body element for the debug toolbar to show up in the public site as
 well.

 So, you could either show full HTML documents with body elements from the
 beginning in the tutorial,
 or
 in [https://docs.djangoproject.com/en/4.2/intro/tutorial08/#installing-
 django-debug-toolbar this part of the tutorial], after the sentence
 ''"Once installed, you should be able to see the DjDT “handle” on the
 right side of the browser window when you refresh the polls
 application."'', you could add something like: ''"note that for the django
 debug toolbar to show up correctly, you should properly make each template
 a full HTML document, as we mentioned it to be best practice earlier"''.

 The aforesaid "mentioned earlier" is
 [https://docs.djangoproject.com/en/4.2/intro/tutorial03/#write-views-that-
 actually-do-something here] in the "note" section, when said: ''"To make
 the tutorial shorter, all template examples use incomplete HTML. In your
 own projects you should use complete HTML documents."''

 These are just suggestions of course! Do as it seems better for the whole
 community!
 And thank you anyway =)

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34499#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701878674ab38-bb2a81d7-6589-4d5f-af57-e71518a7d99c-000000%40eu-central-1.amazonses.com.

Reply via email to