[Django] #30576: Code not working on Django Tutorial part 6

7 views
Skip to first unread message

Django

unread,
Jun 18, 2019, 10:59:08 AM6/18/19
to django-...@googlegroups.com
#30576: Code not working on Django Tutorial part 6
-------------------------------------+-------------------------------------
Reporter: javiercmh | Owner: nobody
Type: Bug | Status: new
Component: | Version: 2.2
Documentation | Keywords: django, tutorial,
Severity: Normal | background, image
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
In the section "Adding a background-image" (Part 6 of Django tutorial)
teaches how to add a background image by editing style.css as follows:
{{{#!css
body {
background: white url("images/background.gif") no-repeat;
}
}}}
However, this won't work because it doesn't reference the actual location
of the image file. The following change fixes the issue (add
**''/static/''**):
{{{#!css
body {
background: white url("/static/images/background.gif") no-repeat;
}
}}}

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

Django

unread,
Jun 19, 2019, 1:26:58 AM6/19/19
to django-...@googlegroups.com
#30576: Code not working on Django Tutorial part 6.
-------------------------------------+-------------------------------------
Reporter: Javier Carrasco | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution:
| worksforme
Keywords: django, tutorial, | Triage Stage:
background, image | Unreviewed
Has patch: 0 | Needs documentation: 0

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

* status: new => closed
* has_patch: 1 => 0
* version: 2.2 => master
* resolution: => worksforme


Comment:

Tutorial 06 works for me. Probably you've made some mistakes with
directories, `background.gif` should be inside
`polls/static/polls/images`.

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

Reply all
Reply to author
Forward
0 new messages