django-form-utils
django-form-utils copied to clipboard
ImageWidget and Amazon S3
So, the two don't play together when you don't use utilize any thumbnail generator. The reason is that instead of invoking the ImageField's url method, it performs a "manual" join between the project's media folder and the image path - and that simply doesn't work with remote storages such as Amazon's.
I have forked and fixed it for myself, and would like to send a pull request, but I have can't figure out how to run the tests - for some reason they are in the egg, but not in the app itself...
How do I run the tests?
python setup.py test will run the tests using your current environment (requires that you have Django installed, and probably PIL too if you want the ImageWidget tests to run). Alternatively, you can run tox (if you "pip install tox") and it will run the tests against a variety of Python and Django versions (it may have some errors if you don't have all the requisite Python versions available).
I should really have a CONTRIBUTING doc...
Thanks - I've just figured and out and came to respond, and you had already replied (that was quick!)... I'll prepare a pull request.
Apparently, once PIL is installed, all tests pass. Is it safe to post a pull request?
sure! ideally your pull request would also add a new test for the thing it is fixing, but I can take a look, it might be ok to merge without that if it passes existing tests.
Hey, been using this in another project (using S3 again), and it seems to be working well. Seeing the S3-hosted-image. Closing.
Correction: Still not solved.