Greetings When trying to upload an image used as a profile picture for the elements (rows) in a model (it's a "media" image, not a "static" one), I get a Server Error (500). I can't give any more detailed information about the error because I can't read my error.log for some reason, the newest error.log file is blank.
This is my upload:
def get_image_path(instance, filename):
return os.path.join('/media/images', str(instance.id), filename)
class Artist(models.Model):
name = models.CharField(max_length=255)
soundcloud = models.URLField(max_length=255, blank=True, null=True)
description = models.TextField()
profile_picture = models.ImageField(upload_to=get_image_path, blank=True, null=True)
current_roster = models.BooleanField(default=True)
def __str__(self):
return self.name.encode('utf8')
Could anyone help me please?
Thank you very much!