I'm developping a Django interface and i have a problem changing name of an uploaded file.
Here's a part of my model
class Test(models.Model):
var = models.IntegerField()
var1 = models.ManyToManyField('OtherClass')
file = models.FileField(upload_to='dir/%d',storage=MyFileSystemStorage())
As you can see, i have some manytomanyfield models and i want to be able to change the name of my file uploaded when i save it. I did it with my own method "MyfileSystemStorage", the problem is that i want to add var1 information "selected" in admin interface to the name of the file when i save.
Is it possible to do that and how? please if someone can help me i would be grateful ..
Thanks to all see ya