New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending the FileBrowser backend to add support for ImageField #101
Extending the FileBrowser backend to add support for ImageField #101
Conversation
Hey @fgmacedo , I plan to release a new version that incorporates your FileBrowser backend in the next days. I quickly tried to test the backend as I haven't used On the other hand we currently repeat most of the documentation form https://github.com/jonasundderwolf/django-image-cropping#django-filebrowser vs. It's probably safe to assume that only people who are already familiar with Finally I really would like to have some basic integration tests that show that both backends work as advertised and switching backends work. Especially as we are currently not using the FileBrowser backend ourselves it would be good to have some checks so we don't break stuff unintentionally while the app progresses. |
Hi @anrie ! Thanks for your reply. Good to know about the release. Please let me know if you need something. You probably forgot to add grappelli urls into your urls.py:
I totally agree with you about the setup instructions, and about the integration tests. I'm able to submit another PR with filebrowser related tests. But while I was reading your reply, I realize that the major efforts were put to isolate backend specific logic under a facade. And since the backend config is a python path for a class, and that all the code that is suposed to run only for What do you think of instead a PR to add tests, a PR to wipe out We can open a section on django-image-cropping's readme to list third-party backends, so maybe in the future I'm not the only one to use Please let me know. Best regards, |
Hey @fgmacedo, I actually had the same idea. I think moving the backend to its own repository is a really good idea as it makes maintaining things a lot simpler. We don't ship code that we don't use and you can iterate much quicker if you plan to extend the backend. Maybe we could use something like I guess we only need a convention/schema to declare compatible version. Thanks a lot for your efforts! |
Nice! I think that Something like:
I'll work on this in the next days. |
Is it possible to implement this using custom actions? Like anrie, after implementing the FileBrowser backend, I have no idea where to actually crop the image. In Filebrowser, you can create an "action" on an item and I think that would be the best place to pop a modal or something to actually crop the image. |
We rather keep the backends in separate packages. See PR #101 for the relevant discussion.
@fgmacedo I now removed the filebrowser backend from the main package and adjusted the docs accordingly. Let me know when you have repo/package for the additional backends so we can refer to them in the README. Have a nice sunday! |
The current file-browser backend only has support for the
FileBrowserField
. This PR enables the use of FileBrowser as backend with regularImageFeld
fields.PS: The file-browser was published on pypi with the changes to add django-image-cropping support.