#32419: MEDIA_URL and MEDIA_ROOT configuration ambiguous; suggested adjustment -------------------------------------+------------------------------------- Reporter: | Owner: nobody josefrichter | Type: | Status: new Cleanup/optimization | Component: | Version: 3.1 Documentation | Keywords: media, uploads, Severity: Normal | images, forms, MEDIA_URL, Triage Stage: | MEDIA_ROOT, tutorial Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 1 UI/UX: 0 | -------------------------------------+------------------------------------- Documentation at https://docs.djangoproject.com/en/3.1/howto/static-files /#serving-files-uploaded-by-a-user-during-development suggests amendments to urls.py
If you followed the "Writing your first Django app" tutorial over here https://docs.djangoproject.com/en/3.1/intro/tutorial01/, you may end up with two files {{{mysite/urls.py}}} and {{{polls/urls.py}}} and likely to make the above amendment to {{{polls/urls.py}}}, which is incorrect. The files in that case get uploaded to {{{polls/media/images}}} and then cannot be served (404). The documentation should make it clear the amendment needs to be done in {{{mysite/urls.py}}}. For a person writing Django code for the very first time this is not obvious. I resolved the issue with the help of Django IRC community. -- Ticket URL: <https://code.djangoproject.com/ticket/32419> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/055.3a477a677d1168f70cf02d2dea79d4fe%40djangoproject.com.