[Django] #27872: Tutorial contains invalid instructions regarding background image

10 views
Skip to first unread message

Django

unread,
Feb 22, 2017, 12:56:32 PM2/22/17
to django-...@googlegroups.com
#27872: Tutorial contains invalid instructions regarding background image
-------------------------------------+-------------------------------------
Reporter: Patrik | Owner: nobody
Huber |
Type: Bug | Status: new
Component: | Version: 1.10
Documentation | Keywords: documentation,
Severity: Normal | tutorial
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The tutorial06 (https://docs.djangoproject.com/en/1.10/intro/tutorial06/)
gives some CSS to add a background image to the index.html poll page:

{{{
body {
background: white url("images/background.gif") no-repeat right bottom;
}
}}}

However, this css is for the body tag, and the tutorial never defined any
body tags for the index.html template. So the resulting rendered page
doesn't have a body tag and the background image doesn't load. It looks
like a mistake in the tutorial to me!

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

Django

unread,
Feb 22, 2017, 2:28:27 PM2/22/17
to django-...@googlegroups.com
#27872: Tutorial contains invalid instructions regarding background image
-------------------------------------+-------------------------------------
Reporter: Patrik Huber | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: documentation, | Triage Stage:
tutorial | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

As far as I know that has always worked -- browsers usually add an
implicit `<body>` even if you don't include one. Which browser are you
using?

--
Ticket URL: <https://code.djangoproject.com/ticket/27872#comment:1>

Django

unread,
Feb 22, 2017, 2:56:46 PM2/22/17
to django-...@googlegroups.com
#27872: Tutorial contains invalid instructions regarding background image
-------------------------------------+-------------------------------------
Reporter: Patrik Huber | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.10
Severity: Normal | Resolution: invalid

Keywords: documentation, | Triage Stage:
tutorial | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Patrik Huber):

* status: new => closed
* resolution: => invalid


Comment:

Yes, you are indeed right. It was completely my bad. I created
background.png instead of background.gif (who uses gifs except for
animations anyway? :D), but I of course forgot to rename it in the
.css.... So all is working as expected. Though it is slightly confusing
defining a css for <body> but not having/setting any <body> tags - maybe
you can decide whether it would be sensible to add a hint to the tutorial.

Thanks and sorry for the noise!

--
Ticket URL: <https://code.djangoproject.com/ticket/27872#comment:2>

Reply all
Reply to author
Forward
0 new messages