I have this error after saving an avatar while creating an instance of this model (I didn't rewrite any base django model methods):
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def conference_directory_path(instance, filename):
return BASE_DIR+'/static/dialogues/conferences/conference_{0}/avatar/{1}'.format(instance.id, filename)
class Dialogue(models.Model):
...
avatar = models.ImageField(upload_to=conference_directory_path, blank=True)
...
What's wrong?