I am trying to create a dynamic CSS file using the Django templating engine or any other means.
Currently, I have a CSS rule that looks like this:
You basically have two options:
Serve your CSS dynamically, with an entry in urls.py, etc., just as if it were an HTML page. Your template file will simply be CSS instead of HTML, but will use normal Django template syntax, etc.
Shortcut: Reference your background image with a relative path. This may or may not be possible for your environment, but it's a convenient way of having a static CSS file reference different paths depending on where it's hosted.