Hello there,
I think you just hit #29890[0], a bug present in Django in 2.0+ and fixed
in Django 2.1.3
which should be released today[1].
Simply updating to 2.1.3 when it's released should address your issue.
Cheers,
Simon
[0] https://code.djangoproject.com/ticket/29890
[1] https://docs.django
Here is my model definition
class Item(models.Model):
name = models.CharField(max_length=256)
def item_id_path(instance, filename):
return '{}/{}'.format(instance.item.id, filename)
# Create your models here.
class File(models.Model):
file = models.FileField(upload_to=item_id_path)
2 matches
Mail list logo