Thank you, @tino for your solution! I had to make a minor adjustment as well in order for it to work on my end (Django 5.1.1).
Instead of the callback function that was originally proposed here was my minor tweak:
def skip_static_requests(record):
if record.args.__len__() and str(record.args[0]).startswith("GET /static/"):
return False
return True
Sometimes, the record.args[0]
was not a string and was therefore running into problems with calling the startswith
method.