Code

Opened 7 years ago

Closed 7 years ago

#5359 closed (invalid)

trailing slash missing in documentation

Reported by: walshmj Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by adrian

Can somebody verify that MEDIA_ROOT requires a trailing slash?

comment:2 Changed 7 years ago by mtredinnick

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 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to invalid
  • Status changed from new to closed

Ok, marking as invalid unless someone can reconfirm this.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.