Opened 4 years ago

Closed 4 years ago

#16555 closed Cleanup/optimization (invalid)

admin css / static content wasn't loading

Reported by: leotreasure@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

Following this https://docs.djangoproject.com/en/dev/intro/tutorial02/ lead me to an admin page with no css styling. I mucked around for about an hour before working it out.

I asked on the IRC channel and was recommended this page https://docs.djangoproject.com/en/1.3/howto/static-files/ where I found the solution.

My suggestion is to add these steps onto the tutorial02 website:
set the STATIC_ROOT = "/home/jacob/projects/mysite.com/sitestatic" to your mysite static folder in settings.py
and
Run the collectstatic management command:
./manage.py collectstatic

Regards,

Leo

Change History (4)

comment:1 Changed 4 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by leotreasure@…

I realise I've used the dev tutorial link however both 1.3 and dev tutorials look similar, so I recommend changes be submitted to both versions.

comment:3 Changed 4 years ago by ramiro

Just to be sure: What version of Django were you using when you followed the tutorial? What version of the tutorial did you follow?

comment:4 Changed 4 years ago by russellm

  • Resolution set to invalid
  • Status changed from new to closed

If you're running the tutorial as described, you shouldn't need to run collectstatic. The built-in runserver will serve static media from exactly the same sources that collectstatic will generate them. The only reason you would need to run collectstatic is:

  1. You're running the tutorial code through a full web server, not the development server
  2. You've missed a step in the tutorial.
Note: See TracTickets for help on using tickets.
Back to Top