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
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
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.
More generally stated, you're asking how to serve a static file from Django. If you are running under Apache, you should read http://docs.djangoproject.com/en/dev/howto/deployment/modpython/
If you are running the development server (say, on your laptop), read http://docs.djangoproject.com/en/dev/howto/static-files/
Do note the big, fat disclaimer regarding the Django development server:
What settings do i need to do to make Django see the css file?
None.
Make sure your template includes the CSS file (as standard HTML does) and put the CSS file on the media server.
To clarify: With Django it is highly recommended that you serve all your media (everything that isn't dynamic html) from a different server instance. How you implement that is completely up to you but most people create a subdomain.