Opened 4 years ago
Closed 4 years ago
#32551 closed Cleanup/optimization (invalid)
Need a direct reference of MEDIA_URL and MEDIA_ROOT in file uploads
Reported by: | Ashutosh Vishu Yadav | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/3.1/topics/http/file-uploads/ requires a direct reference of https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-MEDIA_ROOT and https://docs.djangoproject.com/en/3.1/ref/settings/#media-url
The current file upload doc doesn't show the settings.py changes to achieve the result, rather than all the settings it should tell the minimum changes require for the file upload system to work so people don't have to look for another blog to find out what was the problem.
should include or refer:
- a media dir in root
- MEDIA_URL = '/media/' and MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
"File Uploads" docs already contains a reference to File upload settings. It's also explained in FAQs and Managing files docs.