class Image(models.Model)
name = models.ImageField(upload_to='относительный каталог для файлов/', blank=True, verbose_name='подпись')
def content_file_name(instance, filename):
return '/'.join(['content', instance.user.username, filename])
class Content(models.Model):
name = models.CharField(max_length=200)
user = models.ForeignKey(User)
file = models.FileField(upload_to=content_file_name)