Dear all, I'm creating a server that will receive a file and will generate an downloadable output. I would like to allow the user to come back later to get the output and to access his own input, since it takes some time to generate the output.
So, my idea was to put the file in a folder whose name was randomly generated, and to provide the folder name to the user, so, in the future, he would be able to retrieve the files. However, I can't generate the random folder name. My original idea was to make the following model: class upload_form(models.Model): title = models.CharField(max_length=50) file = models.FileField(upload_to="upload/%s" % ''.join(random.sample(string.ascii_lowercase + string.digits,16))) However, django is generating the same random name all the time. Does anybody has an idea of what to do? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.