coderedcorp / coderedcorp/coderedcms

Make built-in models abstract

オープン
#56 コメント 8 件 リアクション 1 件 担当者 0 名 GitHub で見る
Area: Core ⚙ skill: coderedcms Type: Tech Debt
主要言語
Python
スター
765
フォーク
154
PR マージ指標
30日以内にマージされた PR はありません

説明

If we want to continue using CODERED_FRONTEND_* settings (which I think we do, they will be the foundation of themes), we will have to make everything that uses our streamfield blocks abstract.

The issue is, many coderedcms models use streamfield blocks that pull values from CODERED_FRONTEND_* settings. Which means if you change one of these settings in your project, it triggers a migration in coderedcms. Which is a bad practice and leads to endless migrations.

This fits in with the paradigm we have been following with the page types. Provide beefy abstract models, and provide a very basic concrete model boilerplate in the project template.

One caveat to making the snippets abstract, is that we will no longer be able to provide a snippet chooser, or hard-code templates that pull in navbar/footer snippets. So this will have to be thought through to figure out how to gracefully handle all of this without re-defining everything in the project template (which would be too much boilerplate I think).

Anyhow, this pretty major regarding future stability. Implementing it will inevitably be a breaking change. But there is no other way to have dynamic blocks and themes. So I think it is necessary.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、組み込みモデル、StreamField blocks、CODERED_FRONTEND_* settings、snippet の処理、および issue で言及されているプロジェクトテンプレートを整理します。抽象モデルが snippet の選択、navbar/footer templates、マイグレーションにどのような影響を与えるかを判断します。完了の条件は、過剰な boilerplate なしにプロジェクト固有の setting マイグレーションを回避する、文書化された設計があることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
django, python
領域
backend, content
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。