A static resource directory stores files a web application serves unchanged: images, CSS, and JavaScript. In Django, the project-level static directory is the tidy cupboard for these assets, even though production may deploy them somewhere else. section 7.3
Set up a simple Django static directory like this:
- Place an asset such as logo.png in static/img. section 7.3
- Keep images, JavaScript, and CSS in separate subdirectories so the directory does not become an asset junk drawer. section 7.3
Templates use Django’s static tag to turn a path relative to the static directory into a URL. Load the tag library, then write {% static 'img/logo.png' %} inside an HTML image or link tag. The browser requests that URL, and Django’s development server serves the matching file. section 7.3
RiffMates home page
With logo.png in RiffMates/static/img, home.html loads the static tag library and displays the logo. The same page can link to the application’s named routes, while base.html adds a Home link to the navigation.

