Linking to Images in CSS

In a css file, you just have to make it start with your static url (e.g. /static/...) and then when django runs collectstatic it'll replace those values with the real static path. In development hopefully that'll work fine.

For some reason I'm having trouble finding a source on that. Here's a test with the hashed storage where they're asserting it works:

https://github.com/django/django/blob/6c0042430e3618ce5c276d195d92a6b884daa3a3/tests/staticfiles_tests/test_storage.py#L57

It's possible this only works via HashedFilesMixin since this looks like the converter https://github.com/django/django/blob/a38ae914d89809aed6d79337b74a8b31b6d3849a/django/contrib/staticfiles/storage.py#L182

/r/django Thread