v0.19.0.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. CodeRed CMS 0.19.0 release notes
  2. ================================
  3. Bug fixes
  4. ---------
  5. * Support custom image models by correctly using ``WAGTAILIMAGES_IMAGE_MODEL``
  6. versus hard-coding ``wagtailimages.Image``.
  7. * ``coderedcms start`` now pins the version of CodeRed CMS in the generated
  8. ``requirements.txt`` file.
  9. New features
  10. ------------
  11. * Upgraded to Wagtail 2.9
  12. * Upgraded to Bootstrap 4.5 and jQuery 3.5.1
  13. * ``coderedcms start`` no longer creates a boilerplate Dockerfile. This has
  14. been replaced with a more thorough guide: :doc:`/how_to/docker`.
  15. Upgrade considerations
  16. ----------------------
  17. * For Wagtail 2.9 ``SiteMiddleware`` and ``request.site`` are deprecated.
  18. Custom code in your project should be updated as so:
  19. * In python, replace ``request.site`` with ``Site.find_for_request(request)``.
  20. * In Python, to load a site setting, replace
  21. ``Setting.for_site(request.site)`` with ``Setting.for_request(request)``.
  22. * In HTML templates, replace ``request.site`` with:
  23. ..code-block: html
  24. {% load wagtailcore_tags %}
  25. {% wagtail_site as site %}
  26. <p>Your site name is: {{site.site_name}}</p>
  27. * Following these changes, you should then remove
  28. ``wagtail.core.middleware.SiteMiddleware`` from the Django ``MIDDLEWARE``
  29. (in ``settings/base.py``)
  30. * If you have overridden ``coderedcms/pages/base.html``, you may need to update
  31. references to ``jquery-3.4.1`` to ``jquery-3.5.1``.
  32. * If using SASS, you may need to update your ``custom.scss`` and/or
  33. ``_variables.scss`` files accordingly to support Bootstrap 4.5. To see what
  34. you might need to change in your ``_variables.scss``, see `the variables diff
  35. of Bootstrap 4.3 to 4.5`_. Or to continue using Bootstrap 4.3, `download a
  36. copy of the Bootstrap 4.3 sources`_ and change the references in your
  37. ``custom.scss`` to use these files.
  38. * It is assumed that all CodeRed CMS sites prior to 0.19 are using the built-in
  39. Wagtail Image model, as this was previously hard-coded in CodeRed CMS. If (and
  40. only if) you plan to switch to a custom image model, a custom data migration
  41. will be necessary. This migration would follow the same process as any other
  42. Wagtail installation; there is nothing unique relating to CodeRed CMS.
  43. * You may need to run ``python manage.py makemigrations website`` and
  44. ``python manage.py migrate`` after upgrading.
  45. .. _the variables diff of Bootstrap 4.3 to 4.5: https://github.com/coderedcorp/coderedcms/commit/fa852ebc9d714d34b25c390321e5a6d563156097#diff-a68086c64c5d52852fda5605321c3eb9
  46. .. _download a copy of the Bootstrap 4.3 sources: https://getbootstrap.com/docs/4.3/getting-started/download/