am using a basic imagefield and upload_to function to point to my destination folder. I was wondering if there is something i can use to create folder structure with year/month/day on upload date or something..
regards,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
https://docs.djangoproject.com/en/dev/ref/models/fields/#imagefield
For example, say your MEDIA_ROOT is set to
'/home/media', andupload_tois set to ‘photos/%Y/%m/%d'.The
'%Y/%m/%d'part ofupload_tois strftime formatting.%Yis the four-digit year.%mis the two-digit month.%dis 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.