通常的做法是定义CKEDITOR_UPLOAD_PATH = 'uploads/'
在settings.py
. 但这会将所有模型中的图像保存在唯一的路径中。是否可以为每个模型分配不同的图像路径?
class BlogModel(models.Model):
......
content = RichTextUploadingField() # image upload to /media/blog/
class NewsModel(models.Model):
......
content = RichTextUploadingField() # image upload to /media/news/