2
0

django_settings.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 a background color of red and a text color of white. If
  13. you want to customize this for a particular environment, you can; for example::
  14. CRX_BANNER_BACKGROUND = '#FFFFE0' # light yellow background
  15. CRX_BANNER_TEXT_COLOR = '#000' # black text color
  16. CRX_BANNER_BACKGROUND
  17. ---------------------
  18. String of a valid CSS color code to change the background of the banner.
  19. CRX_BANNER_TEXT_COLOR
  20. ---------------------
  21. String of a valid CSS color code to change the text color of the banner.
  22. CRX_FRONTEND_*
  23. --------------
  24. Various frontend settings to specify defaults and choices used in the wagtail
  25. admin related to rendering blocks, pages, and templates. By default, all
  26. CRX_FRONTEND_* settings are designed to work with Bootstrap 4 CSS framework, but
  27. these can be customized if using a different CSS framework or theme variant.
  28. `Available settings are defined here <https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/settings.py>`.
  29. CRX_PROTECTED_MEDIA_ROOT
  30. ------------------------
  31. The directory where files from File Upload fields on Form Pages are saved. These
  32. files are served through Django using ``CRX_PROTECTED_MEDIA_URL`` and require
  33. login to access. Defaults to ``protected/`` in your project directory.
  34. CRX_PROTECTED_MEDIA_UPLOAD_WHITELIST
  35. ------------------------------------
  36. The allowed filetypes for media upload in the form of a list of file type
  37. extensions. Default is blank. For example, to only allow documents and images,
  38. set to: ``['.pdf', '.doc', '.docx', '.txt', '.rtf', '.jpg', '.jpeg', '.png',
  39. '.gif']``
  40. CRX_PROTECTED_MEDIA_UPLOAD_BLACKLIST
  41. ------------------------------------
  42. The disallowed filetypes for media upload in the form of a list of file type
  43. extensions. Defaults to ``['.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py',
  44. '.php', '.pl', '.rb']``
  45. CRX_PROTECTED_MEDIA_URL
  46. -----------------------
  47. The URL for protected media files from form file uploads. Defaults to
  48. ``'/protected/'``