#21080: collectstatic post-processing fails for references inside comments -------------------------------------+------------------------------------- Reporter: shreyas@… | Owner: Nathan | Gaberel Type: Bug | Status: assigned Component: contrib.staticfiles | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Wolph): Just in case anyone is looking for a _really_ simple hotfix, you can simply strip the quotes from the `name` in `hashed_name()`. Specifically, somewhere at the top of this method: https://github.com/django/django/blob/efc3e32d6d7fb9bb41be73b80c8607b653c1fbd6/django/contrib/staticfiles/storage.py#L79-L111 Or... put this monkeypatch somewhere in your code (settings file for example): {{{#!python from django.contrib.staticfiles import storage import functools original_hashed_name = storage.HashedFilesMixin.hashed_name @functools.wraps(original_hashed_name) def hashed_name(self, name, *args, **kwargs): return original_hashed_name(self, name.strip('"'), *args, **kwargs) storage.HashedFilesMixin.hashed_name = hashed_name }}} -- Ticket URL: <https://code.djangoproject.com/ticket/21080#comment:16> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/075.7cf11fc83f3f9eed5701b55a226264cc%40djangoproject.com.