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 Adrian Holovaty, 17 years ago

Can somebody verify that MEDIA_ROOT requires a trailing slash?

comment:2 by Malcolm Tredinnick, 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 Simon G. <dev@…>, 17 years ago

Resolution: invalid
Status: newclosed

Ok, marking as invalid unless someone can reconfirm this.

Note: See TracTickets for help on using tickets.
Back to Top