Grokking Django
Vote

0% completed

​

Working with Static Files and Template Context

An article's title changes from one page to the next, but the stylesheet that colors it is the same file for every visitor. Django treats these two kinds of content differently. The title comes from the template context, the data a view hands to a template at render time. The stylesheet is a static file: a file such as CSS, JavaScript, an image or a font that is sent to the browser exactly as it is stored on disk.

This lesson covers both. It starts with static files: where to put them, how a template links to them, and who serves them during development and in production

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content