My main goal is to set the image separately on the template on top and resizing it. And I can set more pictures inside the post but the top one will be highlighted and rendered in different HTML page.
Is there any way?
I tried to use ckeditor widget but it is just customizing the toolbar of ckeditor
Please let me know if you have any idea
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4b148528-7b15-4d39-8763-5f3a0f1931b6%40googlegroups.com.
You can resize an image using the Pillow library or open-cv.
Sent from Mail for Windows 10
From: Ali Ahammad
Sent: 17 May 2020 22:45
To: Django users
Subject: How to resize image from Django ckeditor_uploader in the HTML template while rendering?
I am using Django ckeditor_uploader to make a post view for a blog. But while rendering in the template I wanted to render image separately from the post content texts.
My main goal is to set the image separately on the template on top and resizing it. And I can set more pictures inside the post but the top one will be highlighted and rendered in different HTML page.
Is there any way?
I tried to use ckeditor widget but it is just customizing the toolbar of ckeditor
Please let me know if you have any idea
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
Sorry, I’ m just a beginner in Django but I think what you need to look at is the “Fetch API”. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API.
https://www.youtube.com/watch?v=c3qWHnJJbSY
You can send an image through your view as HttpResponse(image_object in bytes/base64 format) object if request==”your desired one”. Then instead of your page reloading the fetch API will receivethe response and then you can use insertAdjacentHtml. For more details you can check the Django IRC channel #django->https://webchat.freenode.net/ and ask there.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44ef45ba-68ce-4e08-a516-c7ff1a827ff5%40googlegroups.com.