Browse Source

Bump dev to version 0.24, add release notes

Vince Salvino 2 years ago
parent
commit
c83f249c5f
4 changed files with 103 additions and 43 deletions
  1. 1 1
      coderedcms/__init__.py
  2. 50 42
      docs/reference/django_settings.rst
  3. 1 0
      docs/releases/index.rst
  4. 51 0
      docs/releases/v0.24.0.rst

+ 1 - 1
coderedcms/__init__.py

@@ -14,7 +14,7 @@ Maintains version of coderedcms.
 
 See: https://www.python.org/dev/peps/pep-0440/
 """
-release = ["0", "23", "0", "", "dev0"]
+release = ["0", "24", "0", "", "dev0"]
 
 
 def _get_version() -> str:

+ 50 - 42
docs/reference/django_settings.rst

@@ -1,70 +1,78 @@
 Wagtail CRX Django Settings
 ===========================
 
-Default settings are loaded from ``coderedcms/settings.py``. Available settings for Wagtail CRX:
+Default settings are loaded from ``coderedcms/settings.py``. Available settings
+for Wagtail CRX:
 
 
-CODERED_PROTECTED_MEDIA_ROOT
-----------------------------
+CRX_BANNER
+----------
 
-The directory where files from File Upload fields on Form Pages are saved. These files are
-served through Django using ``CODERED_PROTECTED_MEDIA_URL`` and require login to access.
-Defaults to ``protected/`` in your project directory.
+If you define a value for this ``CRX_BANNER``, CodeRedCMS will show this text in
+a banner on both the front end and in the CMS of your site. This is useful for
+flagging non-production environments like staging. For example::
 
+    CRX_BANNER = "Staging Environment. Production is over here: <a href='https://example.com'>Example link</a>."
 
-CODERED_PROTECTED_MEDIA_URL
----------------------------
-The URL for protected media files from form file uploads. Defaults to ``'/protected/'``
+You can include basic HTML code, such as a link, in the banner.
 
+The banner defaults to a background color of red and a text color of white. If
+you want to customize this for a particular environment, you can; for example::
 
-CODERED_PROTECTED_MEDIA_UPLOAD_WHITELIST
-----------------------------------------
+    CRX_BANNER_BACKGROUND = '#FFFFE0'	# light yellow background
+    CRX_BANNER_TEXT_COLOR = '#000'		# black text color
 
-The allowed filetypes for media upload in the form of a list of file type extensions.
-Default is blank. For example, to only allow documents and images, set to:
-``['.pdf', '.doc', '.docx', '.txt', '.rtf', '.jpg', '.jpeg', '.png', '.gif']``
 
+CRX_BANNER_BACKGROUND
+---------------------
 
-CODERED_PROTECTED_MEDIA_UPLOAD_BLACKLIST
-----------------------------------------
+String of a valid CSS color code to change the background of the banner.
 
-The disallowed filetypes for media upload in the form of a list of file type extensions.
-Defaults to ``['.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py', '.php', '.pl', '.rb']``
 
+CRX_BANNER_TEXT_COLOR
+---------------------
 
-CODERED_FRONTEND_*
-------------------
+String of a valid CSS color code to change the text color of the banner.
 
-Various frontend settings to specify defaults and choices used in the wagtail admin related
-to rendering blocks, pages, and templates. By default, all CODERED_FRONTEND_* settings are
-designed to work with Bootstrap 4 CSS framework, but these can be customized if using a
-different CSS framework or theme variant.
 
-.. warning::
-    CODERED_FRONTEND_* settings are experimental and are known to cause issues
-    with migrations. If you do need to use them:
+CRX_FRONTEND_*
+--------------
 
-    * DO NOT run ``makemigrations`` or ``makemigrations coderedcms``
-    * ONLY run migrations for specific apps, i.e. ``makemigrations website``
+Various frontend settings to specify defaults and choices used in the wagtail
+admin related to rendering blocks, pages, and templates. By default, all
+CRX_FRONTEND_* settings are designed to work with Bootstrap 4 CSS framework, but
+these can be customized if using a different CSS framework or theme variant.
 
+`Available settings are defined here <https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/settings.py>`.
 
-CODERED_BANNER
---------------
 
-If you define a value for this ``CODERED_BANNER``, CodeRedCMS will show this text in a banner
-on both the front end and in the CMS of your site. This is useful for flagging non-production
-environments like staging. For example::
+CRX_PROTECTED_MEDIA_ROOT
+------------------------
 
-    CODERED_BANNER = "Staging Environment. Production is over here: <a href='https://example.com'>Example link</a>."
+The directory where files from File Upload fields on Form Pages are saved. These
+files are served through Django using ``CRX_PROTECTED_MEDIA_URL`` and require
+login to access. Defaults to ``protected/`` in your project directory.
 
-You can include basic HTML code, such as a link, in the banner.
 
+CRX_PROTECTED_MEDIA_UPLOAD_WHITELIST
+------------------------------------
+
+The allowed filetypes for media upload in the form of a list of file type
+extensions. Default is blank. For example, to only allow documents and images,
+set to: ``['.pdf', '.doc', '.docx', '.txt', '.rtf', '.jpg', '.jpeg', '.png',
+'.gif']``
+
+
+CRX_PROTECTED_MEDIA_UPLOAD_BLACKLIST
+------------------------------------
+
+The disallowed filetypes for media upload in the form of a list of file type
+extensions. Defaults to ``['.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py',
+'.php', '.pl', '.rb']``
 
-CODERED_BANNER_BACKGROUND, CODERED_BANNER_TEXT_COLOR
-----------------------------------------------------
 
-The banner defaults to a background color of red and a text color of white. If you want to
-customize this for a particular environment, you can; for example::
+CRX_PROTECTED_MEDIA_URL
+-----------------------
 
-    CODERED_BANNER_BACKGROUND = '#FFFFE0'	# light yellow background
-    CODERED_BANNER_TEXT_COLOR = '#000'		# black text color
+The URL for protected media files from form file uploads. Defaults to
+``'/protected/'``

+ 1 - 0
docs/releases/index.rst

@@ -22,6 +22,7 @@ Wagtail CRX (previously CodeRed CMS) follows the
 .. toctree::
     :maxdepth: 1
 
+    v0.24.0
     v0.23.1
     v0.23.0
     v0.22.3

+ 51 - 0
docs/releases/v0.24.0.rst

@@ -0,0 +1,51 @@
+v0.24.0 release notes
+=====================
+
+
+This release is focused primarily on resolving internal tech debt. This
+translates to improved reliability and improved developer experience.
+
+
+Upgrade considerations
+----------------------
+
+* Template tag ``codered_settings`` has been renamed ``crx_settings``. You
+  should find/replace this in any of your HTML or other Django template files.
+
+* Django settings beginning with ``CODERED_*`` have been renamed to ``CRX_*``.
+  You should find/replace these in your Django settings files.
+
+* ``wagtail-import-export`` has been removed as a dependency. You should remove
+  this from ``INSTALLED_APPS`` in your Django settings. As a result,
+  import/export from JSON files has been removed. However we have preserved the
+  ability to import Pages from CSV files. See :doc:`/features/import_export`.
+
+
+Internal changes
+----------------
+
+The following changes are not publicly documented APIs, but have changed. Most
+sites should not be using any of these APIs and therefore can ignore this
+section. In case your site deeply hooks into the package, these are here for
+reference.
+
+* ``coderedcms.settings.cr_settings`` has been replaced with
+  ``coderedcms.settings.crx_settings`` which is no longer a dictionary, but an
+  object which behaves exactly like the Django settings. This object will first
+  retrieve a Django setting, and if it does not exist, will then load a CRX
+  default.
+
+* Internal uses of Wagtail ``StreamField`` on concrete models have been replaced
+  with ``CoderedStreamField`` which will not generate migrations based on block
+  changes. This effectively eliminites most of our historic migration problems.
+
+  As a result, all past migrations have been hand-edited to reflect this change.
+  No action is required in client sites.
+
+  Client sites can freely use ``coderedcms.fields.CoderedStreamField`` in place
+  of Wagtail's ``StreamField`` to eliminate the giant migrations problem
+  inherent to Wagtail. However this API is not publicly documented at this time.
+
+* Choice fields on internal concrete models have been replaced with a
+  lazy-loading mechanism to load choices and defaults at runtime. This further
+  eliminates historic migration problems.