How do I use CSS in Django?

gath picture gath · Nov 4, 2008 · Viewed 94.4k times · Source

I am creating my application using Django, and am wondering how I can make Django use my CSS file? What settings do I need to do to make Django see the css file?

NB: On a local machine

Answer

Joe picture Joe · Mar 6, 2009

If you're using the development server follow the django project's how-to guide for managing static files to setup your URL's, then reference you media files in the template -- say, an image inside an image folder from /site_media/images/foo.gif.