Opened 13 years ago

Closed 13 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 by anonymous, 13 years ago

comment:2 by leotreasure@…, 13 years ago

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 by Ramiro Morales, 13 years ago

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 by Russell Keith-Magee, 13 years ago

Resolution: invalid
Status: newclosed

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