I am implementing my application and that i question what I am missing.
Used to do the next:
- Set my STATIC_ROOT for an empty folder during my server.
- Set the STATIC_Hyperlink to '/static/'
- Added 'django.contrib.staticfiles' to INSTALLED_Applications
In development my static files have been in the main of my application inside a folder named static.
So, I went manage.py collectstatic and all sorts of my files were replicated to my static_root.
However, it does not work. I'm not sure if i am missing any step.
Any help could be great Thanks
As described in Django's documentation, Django serves static files itself in development only, when implementing the application being produced, the choice is yours to create your internet server (apache, lighttpd, nginx, whatever) serve the static files.
Django's documentation provides instructions for doing this with Apache here
. 4. Point Apache at the static folder.
Django while it isn't in debug mode shouldn't serve static files, for performances reasons, you need to use:
then configure your internet server (apache or nginx) for everyone this folder right url.