Closed dominicrodger closed 9 years ago
Hmmm... not sure those build failures are related to my changes. Any ideas here @jonasundderwolf?
FYI - I started a discussion on django-developers about this - feels like something Django should support more directly.
Hey Dominic,
thanks for the PR!
The broken tests seem unrelated to me: They look more like a Selenium/Travis CI issues. But I see that i get them fixed sometime soon so we have a clear baseline and can be sure that your changes can be safely merged.
@anrie - that seems a reasonable approach to me. I'll have a go at updating the PR today or tomorrow.
Does that look better @anrie? Your suggestion has the advantage of improved Django support too - since the static
template tag goes back to at least Django 1.4.
Looks good to me and is merged!
Previously, using ManifestStaticFilesStorage with django- image-cropping wouldn't work, because the path to the file was hard-coded. This change cribs from django.contrib.admin for manipulating the path to the static file before handing it off to Django forms. Arguably, it'd be nice if this is something Django handled for us, but until it does, we need to do this work ourselves.
For Django versions earlier than 1.7, we don't change behaviour, since figuring out whether the staticfiles app is installed is hard without django.apps.