WebFaction
Community site: login faq

I'm using webfaction to make a simple static website. I think I have done everything correctly, but still my static files (i.e css, images) are not being served. I used this guide to set things up:

http://docs.webfaction.com/software/django/getting-started.html

I did everything they told me to, so in brief:

1) made a separate static media application

2) updated settings.py

3) ran

python manage.py collectstatic

All of the above went pretty much according to plan and I can now see my static files in the staticfile application that I named personalsitestatic. My django application is called personalsite.

The directory structure looks like this:

  • webapps
    • htdocs
    • personalsite
      • apache2
      • bin
      • lib
      • PersonalWebsite
        • manage.py
        • PersonalWebsite
          • settings.py, urls.py, ect
        • main
          • settings.py, urls.py, static files directory, ect
    • personalstiestatic
      • bootstrap
      • custom

This is what the relevant values in my settings.py looks like:

STATIC_ROOT = '/home/<myname>/webapps/personalsitestatic/'
STATIC_URL = 'http://<sitename>.com/static/'
TEMPLATE_DIRS = (
"/home/<myname>/webapps/personalsite/PersonalWebsite/templates/",)

I don't have any additional static directories outside of main/static so I am not using STATIC_DIRS. The templates appear to be loading fine, just none of the static files. When I inspect with firefox's debugger/inspect element thing it just says "stylesheet could not be loaded". Can anyone help me out here or at least give me some suggestions for debugging?

asked 16 Jan '14, 19:15

ohhh
112
accept rate: 0%


Be sure that the static application in the control panel is mounted on the URL /static in your website. This is step 9e of the getting started guide.

permanent link

answered 16 Jan '14, 20:15

timg ♦♦
1.3k4
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×910
×6

question asked: 16 Jan '14, 19:15

question was seen: 2,154 times

last updated: 16 Jan '14, 20:15

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM