Opened 6 years ago

Closed 6 years ago

#30576 closed Bug (worksforme)

Code not working on Django Tutorial part 6.

Reported by: Javier Carrasco Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords: django, tutorial, background, image
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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:

  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/):

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

Change History (1)

comment:1 by Mariusz Felisiak, 6 years ago

Has patch: unset
Resolution: worksforme
Status: newclosed
Summary: Code not working on Django Tutorial part 6Code not working on Django Tutorial part 6.
Version: 2.2master

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

Note: See TracTickets for help on using tickets.
Back to Top