Hard-coding static asset urls is brittle because the place the files are stored depends on the `STATICFILES_STORAGE` used - so if in prod the storage backend uploads to S3 or even renames the file then this hard-coded URL will break.
Using "{% static ... %}" solves that as it knows exactly where the files are stored.
So in practice, do this
# in index.html
{% load static from staticfiles $}
<img src="{% static 'logo.png' %}" />
Instead of this
# in index.html
<img src="/static/logo.png" />
Django Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code hard-coded-static-url
in your pyproject.toml file.