Cody Davis
unread,Jun 19, 2018, 11:18:40 AM6/19/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hey everyone. New to Django here i apologize is this question is already answered somewhere.
So i have read the FileField docs and 50 times. I have defined my MEDIA_URL and MEDIA_ROOT. When i upload an image through the admin, i can see the file goes where i directed it to inside of Django. If i try and go into admin, to the user that uploaded the image and click the link to open it, i get an error saying the ID doesn’t exist, maybe i deleted it?
I searched the internet up and down until i found the solution. I had to map a URL to urls.py to open it. My problem is i have zero understanding why. Like I’ve mentioned i tried finding anything about having to MAP the url to my image and can’t find documentation. Can anyone explain what I’ve done wrong? Or where this is at in the docs? It’s not in the field models that’s for sure.