Re: how to put files in different dirs

2015-02-26 Thread Rodrigo Zayit
Yeah! Or you can write your own method to upload_to. It is easy too. I've made a simple example: https://gist.github.com/rodrigo-zayit/604da297d9c30e7d This example save the pictures in: media/images/products/1/product-slug/randomstring.ext Where "1" is the id of the product's category.

Re: how to put files in different dirs

2015-02-26 Thread Michael Pöhn
On 26.02.2015 02:30, 163 email wrote: > yes , what i mean is "media files". > there are so many file,may be several thousands ,to be uploaded > from client to server. > if all files in one dir , it'll be slow. > but i don't find any way put files in different dirs just using django. > now i writ

Re: Re: how to put files in different dirs

2015-02-25 Thread 163 email
es in different dirs ,but it complex. is there any easy way ? Thanks ! 163 email From: Rodrigo Zayit Date: 2015-02-25 23:36 To: django-users CC: paiis314 Subject: Re: how to put files in different dirs Hi! I didn't understand your question. You don't need to put all your files in t

Re: how to put files in different dirs

2015-02-25 Thread Rodrigo Zayit
Hi! I didn't understand your question. You don't need to put all your files in the same dir... you can create folders like "images", "images/products", "css", "js", etc Or are you asking about "media files"? I mean, files that will be uploaded through admin area...? Best regards, Rodrigo Z

how to put files in different dirs

2015-02-04 Thread 老张
hi . Guys i'm designing a django web site,which produce many files. if all these files are in ONE directory。i'm afraid that performance is a problem. even i can put many entries in stattic-dirs in setting.py.but it seems only one entry in stattic-dirs be used Can anyone tell me how i can put f