如果我有跟踪客户艺术的基本模型:
class ArtEntry(models.Model):
client = models.CharField(max_length=50, choices=CLIENT_CHOICES)
job_number = models.CharField(max_length=30, unique=False, blank=False, null=False)
filename = models.CharField(max_length=64, unique=False, blank=False, null=False)
descriptor = models.CharField(max_length=64, unique=False, blank=True, null=True)
date = models.DateField(("Date"), default=datetime.date.today)
post_type = models.CharField(max_length=64, choices=POST_CHOICES)
该模型的最后一个字段是文件上传字段:
upload = models.FileField(upload_to='documents/*/**/***')
是否可以动态填充“upload_to”参数,以便 * = 输入“客户端”数据和 ** = 输入“作业编号”和* = 'post_type' 选择?