Django:将 UserID 传递给 settings.py

Django: Pass UserID to settings.py

由于这一行,我需要将 UserID 传递给 settings.py:

FROALA_UPLOAD_PATH = os.path.join(BASE_DIR, 'media/froala_editor/', instance.user.id)

我用设置覆盖功能修复了它

Custom default settings¶