I am a newbie to django and trying to create a personal tech blog. I am hosting on webfaction. I have setup the blog using this video. But the stylesheets are not working. I followed the step-by-step procedure to create the static files mentioned by webfaction but still the stlyesheet is not working.
I have created a static application: staticapp
and added it to the website with /static
as mentioned in the webfaction doc.
In settings.py
:
STATIC_ROOT = 'home/myaccount/webapps/staticapp'
STATIC_URL = 'http://myblogtest.myaccount.webfactional.com/static'
STATICFILES_DIRS = ( 'junk','static',)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'blog',
)
I am referencing from my html page like this:
<link rel="stylesheet" type="text/css" href="static/style/style.css" />
Am I missing any step? I could see many answers saying to add a code snippet in urls.py
but it is not mentioned in Webfaction's doc. So I haven't done that.
I could see many have faced this same problem but the answers are not helping me as I am a newbie. Kindly help me to setup this. :)