|
57 | 57 | 'djangocms_alias', |
58 | 58 | 'parler', |
59 | 59 |
|
60 | | - # the default CKEditor - optional, but used in most projects |
61 | | - 'djangocms_text_ckeditor', |
| 60 | + # the next-gen text editor - optional, but used in most projects |
| 61 | + 'djangocms_text', |
62 | 62 |
|
63 | 63 | # optional django CMS frontend modules |
64 | 64 | 'djangocms_frontend', |
|
194 | 194 | # Static files (CSS, JavaScript, Images) |
195 | 195 | # https://docs.djangoproject.com/en/3.1/howto/static-files/ |
196 | 196 |
|
197 | | -STATIC_URL = '/static/' |
198 | | -STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_collected') |
199 | | -STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' |
200 | | - |
201 | | -# Media files |
202 | | -# DEFAULT_FILE_STORAGE is configured using DEFAULT_STORAGE_DSN |
| 197 | +STATICFILES_DIRS = [ # this are were django staticfiles is looking for sources |
| 198 | + BASE_DIR / "backend" / "static", |
| 199 | +] |
203 | 200 |
|
204 | | -# read the setting value from the environment variable |
205 | | -DEFAULT_STORAGE_DSN = os.environ.get('DEFAULT_STORAGE_DSN') |
| 201 | +STATIC_URL = '/static/' |
| 202 | +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_collected') # this is were the collected files are placed |
206 | 203 |
|
207 | | -# dsn_configured_storage_class() requires the name of the setting |
| 204 | +# read the setting value from the environment variable. This functionality is |
| 205 | +# provided by https://github.com/divio/django-storage-url |
| 206 | +DEFAULT_STORAGE_DSN = os.environ.get('DEFAULT_STORAGE_DSN', '/data/media/') |
208 | 207 | DefaultStorageClass = dsn_configured_storage_class('DEFAULT_STORAGE_DSN') |
209 | 208 |
|
210 | | -# Django's DEFAULT_FILE_STORAGE requires the class name |
211 | | -DEFAULT_FILE_STORAGE = 'backend.settings.DefaultStorageClass' |
| 209 | +STORAGES = { |
| 210 | + 'default': { |
| 211 | + 'BACKEND': 'backend.settings.DefaultStorageClass', |
| 212 | + }, |
| 213 | + 'staticfiles': { |
| 214 | + 'BACKEND': 'whitenoise.storage.CompressedManifestStaticFilesStorage', |
| 215 | + # 'BACKEND': 'whitenoise.storage.CompressedStaticFilesStorage', |
| 216 | + }, |
| 217 | +} |
212 | 218 |
|
213 | 219 | # only required for local file storage and serving, in development |
214 | 220 | MEDIA_URL = 'media/' |
215 | | -MEDIA_ROOT = os.path.join('/data/media/') |
| 221 | +MEDIA_ROOT = '/data/media/' |
216 | 222 |
|
217 | 223 |
|
218 | 224 | SITE_ID = 1 |
|
0 commit comments