Well i have that. My problem really is i can’t find anywhere in the docs that 
says i need to add that. I’m really just looking for the documentation on it. 

Sent from my iPhone

> On Jun 19, 2018, at 08:06, Akshay Gaur <gaur.aks...@gmail.com> wrote:
> 
> Maybe there is an issue with the way django is serving the docs. Try the 
> following:
> in your base urls.py, add the following: 
> if settings.DEBUG:
>     urlpatterns += static(settings.MEDIA_URL, 
> document_root=settings.MEDIA_ROOT)
> 
> In case this doesn't work, would it be possible for you to post the relevant 
> part of the code and some screenshots?
> 
> Hope this helps.
> Akshay
> 
>> On Tuesday, June 19, 2018 at 6:18:40 AM UTC-5, Cody Davis wrote:
>> 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.  
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/08ac90aa-c3a7-45fb-8af8-27252e52c8f3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/FA21E74B-B694-4EFE-9ACC-EFBB32C511C9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to