Opened 17 years ago
Closed 17 years ago
#5359 closed (invalid)
trailing slash missing in documentation
Reported by: | walshmj | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
http://www.djangoproject.com/documentation/model-api/#filefield
For example, say your MEDIA_ROOT is set to '/home/media', and upload_to is set to 'photos/%Y/%m/%d'. The '%Y/%m/%d' part of upload_to is strftime formatting; '%Y' is the four-digit year, '%m' is the two-digit month and '%d' is the two-digit day. If you upload a file on Jan. 15, 2007, it will be saved in the directory /home/media/photos/2007/01/15.
Change History (3)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
I can't see how this would be true. Everywhere we refer to MEDIA_ROOT in the code and use it to create a pathname, we use os.path.join, which adds the directory separator between the components, if needed.
comment:3 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ok, marking as invalid unless someone can reconfirm this.
Can somebody verify that MEDIA_ROOT requires a trailing slash?