Closed iurisilvio closed 10 years ago
I focused on the url_for
, added some tests but didn't added a test runner or any test configuration to setup.py. Also, didn't added Flask-Testing dependency.
About the implementation, I had to use the url_for
build error handler, because this URL is defined dynamically.
I'm not sure how to do it in setup.py, I have to learn about it, but you should care about tests, docs and everything, because it is an important plugin for Flask environment.
I thought I responded to this yesterday, lets try again!
I do care quite a bit about tests/docs/everything, and I could make excuses with regard to the history of the project, but I won't.
Instead, I'm currently fighting with PIL's dependencies to get Travis-CI to run your tests. =]
Once I have that, I'll release these 3 PRs as v1.1.0 (or similar).
This also responds to url_for('images.crop', ...)
or any of the modes.
Released to PyPI as v1.1.0.
Cheers!
No, it doesn't work this way. I created only the images
route (based in IMAGES_NAME
).
It is really easy to create these other routes, but I preferred to make it simple for the first patch, the way resized_img_src
works.
It does, because I added it. =P
Using
url_for
to generate Flask-Images URLs instead of a custom function. Use the routeimages
(configurable withIMAGES_NAME
).e.g.
url_for('images', filename='image.png', width=30, mode='crop')
I didn't removed the
resized_img_src
behaviour to maintain compatibility.Close #5.