2
0

django_settings.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Wagtail CRX Django Settings
  2. ===========================
  3. Default settings are loaded from ``coderedcms/settings.py``. Available settings
  4. for Wagtail CRX:
  5. CRX_BANNER
  6. ----------
  7. If you define a value for this ``CRX_BANNER``, CodeRedCMS will show this text in
  8. a banner on both the front end and in the CMS of your site. This is useful for
  9. flagging non-production environments like staging. For example::
  10. CRX_BANNER = "Staging Environment. Production is over here: <a href='https://example.com'>Example link</a>."
  11. You can include basic HTML code, such as a link, in the banner.
  12. The banner defaults to yellow background and black text. If you want to
  13. customize the color, you can specify any HTML color name or code. For example::
  14. CRX_BANNER_BACKGROUND = '#FFFFE0' # light yellow background
  15. CRX_BANNER_TEXT_COLOR = '#000' # black text color
  16. For greater customization, you can fully override the banner's HTML template:
  17. ``coderedcms/includes/crx_banner.html``.
  18. CRX_BANNER_BACKGROUND
  19. ---------------------
  20. String of a valid CSS color code to change the background of the banner.
  21. CRX_BANNER_TEXT_COLOR
  22. ---------------------
  23. String of a valid CSS color code to change the text color of the banner.
  24. CRX_FRONTEND_*
  25. --------------
  26. Various frontend settings to specify defaults and choices used in the wagtail
  27. admin related to rendering blocks, pages, and templates. By default, all
  28. CRX_FRONTEND_* settings are designed to work with Bootstrap 5 CSS framework, but
  29. these can be customized if using a different CSS framework or theme variant.
  30. `Available settings are defined here <https://github.com/coderedcorp/coderedcms/blob/main/coderedcms/settings.py>`.
  31. CRX_PROTECTED_MEDIA_ROOT
  32. ------------------------
  33. The directory where files from File Upload fields on Form Pages are saved. These
  34. files are served through Django using ``CRX_PROTECTED_MEDIA_URL`` and require
  35. login to access. Defaults to ``protected/`` in your project directory.
  36. CRX_PROTECTED_MEDIA_UPLOAD_WHITELIST
  37. ------------------------------------
  38. The allowed filetypes for media upload in the form of a list of file type
  39. extensions. Default is blank. For example, to only allow documents and images,
  40. set to: ``['.pdf', '.doc', '.docx', '.txt', '.rtf', '.jpg', '.jpeg', '.png',
  41. '.gif']``
  42. CRX_PROTECTED_MEDIA_UPLOAD_BLACKLIST
  43. ------------------------------------
  44. The disallowed filetypes for media upload in the form of a list of file type
  45. extensions. Defaults to ``['.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py',
  46. '.php', '.pl', '.rb']``
  47. CRX_PROTECTED_MEDIA_URL
  48. -----------------------
  49. The URL for protected media files from form file uploads. Defaults to
  50. ``'/protected/'``