I was looking at Django fixtures in the docs, there was no mention of preloading images into the database. I can't be the only who needed to do this. Is this possible? If so how? If not, are there any workarounds available?
Please and thank you.
Yes, it's possible. You have to put your image in your project MEDIA_ROOT. In fixtures it will look like
[{ "pk": 1, "model": "pictures.picture", "fields": { "image": "/media/gebakken_kip_met_korianderrijst_1152_x_1728.png" } }]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With