2 days of banging my head against the wall. I know this has been answered many times but i'm seriously struggling. I have followed all the docs, especially: https://docs.webfaction.com/software/django/config.html my django app is set up: portfolio_django (django1.7/python2.7.4) my static only app is set up: "portfolio_static" (no .htaccess). django points to it:
ran python2.7 manage.py collectstatic files ARE copied into static app. when i run: in the template:
404 error.. I'm almost certain my settings.py is correct, and findstatic finds it. how do i know that www.josephmohan.co.uk/static is actually pointing at the static server? the admin files are a 404 aswell, I've been using Django for a couple of years, but i'm new to webfaction. To any webfaction guys please feel free to dig through my code, the website is josephmohan.co.uk asked 09 Apr '15, 16:21 skru |
I added your "portfolio_static" app to your site configuration, using "/static" as the URL path, and your CSS is now loading. Hope that helps! answered 09 Apr '15, 17:30 seanf |
Worked it out... in myproject/urls.py: urlpatterns = patterns('',
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) answered 09 Apr '15, 17:33 skru |
Thanks! the best thing about days like this is you learn a tonne!