Every website needs manage static files such as CSS and images as well as serving Javascript. In django these are referred to as “static” files and django provides the django.contrib.staticfiles class to help you manage them. You will need to learn how to manage the static media in your own project using this module. If you are using external pluggable applications in your project, you will need to learn make sure that their static media are properly referenced and included in your own project.
Goals/Objectives/Outcomes
- Participant understands how to configure the STATIC_URL in their projects settings file.
- Participants understands how to use the statictiles templatetags
- Participant understands how to serve static files during development
- Participant understands how to use the collectstatic management command to deploy for production
Reference Material
- https://docs.djangoproject.com/en/1.8/howto/static-files/
- https://docs.djangoproject.com/en/1.8/howto/static-files/deployment/
- http://www.effectivedjango.com/tutorial/static.html
- http://www.tangowithdjango.com/book/chapters/templates_static.html
Measures of Success
- Participant has demonstrated the ability to work with static files during development of their project and deploy them into production