hi u all i'm progressing in my django wisdom jeje but everyday i face new challenges and/or problems... 'im working on a uploading files application... and i want to store every uploaded file into its right path, arranged by username
example... if a user called 'user123' uploads a file from a regular filefield in a form... lets say: text.pdf i want that pdf to be stored into 'path/to/uploads/user123/text.pdf' right now i have 'path/to/uploads/text.pdf' the model around the files is something like: class Upload (models.Model): userUploader = models.ForeignKey(User) date = models.DateTimeField(default=datetime.datetime.now) fileUpload = models.FileField(upload_to=PATH) how can i link the current user logged in to its specific path?? i mean, how can i make something like: fileUpload = models.FileField(upload_to=PATH + "/" + User.username) ?? i hope i got myself clear... bye! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---