Re: Upload file to a dynamically generated location

2018-01-08 Thread Andréas Kühne
Hi, If you look at the documentation for the upload_to parameter, you can see that you can do exactly what you want: https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.FileField.upload_to The upload_to method (in your case "get_user_document_directory") can take 2 parameter

Upload file to a dynamically generated location

2018-01-08 Thread pieceofkayk2718
Hey Friends, I'm having trouble figuring out how to upload a document model to a dynamically generated location. The following models.py file contains two models and a helper function views.py # I would like the string inputs to be self.bundle.user, and self.bundle.name where self is the