Steps for adding ImageField in Django, Django Rest Framework

1. pip install pillow
2. modify the task app model and add ImageField to handle images
3. modify serializer for image and file field
4. create a folder in base project directory to store MEDIA data (i.e.: images, uploaded files)
5. Add MEDIA related settings (MEDIA_ROOT & MEDIA_URL) ins settings.py file.
6. Modify url.py in order to handle static media content

Tek Shinobi
Author: Tek Shinobi

Hiya Ninjas, I am the ninja who invented the fire, wheel, science, technology and everything intelligent this humanity has ever experienced since its evolution from monkeys and germs. Actually, above is a partial list. I also was involved with the Big Bang that created this universe. What was it like before the Big Bang is so secret that if I tell you, I will have to turn you into a hobbit and force you to be my gardener. Okay. Sayonanra, Namaste Tek Shinobi




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *