Tag: filefield


Tip - Dynamic Path For FileField

In a recent project I needed to save a file to a dynamic directory. My model was something like this: from django.db import models class MyDoc(models.Model): name = models.CharField() document = models.FileField(upload_to='uploads/documents') with this code each document will

Continue Reading