coderedcorp / coderedcorp/coderedcms
Use correct site when loading settings
- 主要言語
- Python
- スター
- 765
- フォーク
- 154
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When loading wagtail settings, such as `GoogleApiSettings` or `MailchimpApiSettings` we have a tendency to do these in a place where no `Site` is available and explicitly load the default site. This is a bad practice as it totally breaks the concept of multi-site.
This practice needs to be refactored to get the site from the page or request, and if those are not available, use dependency injection techniques.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、デフォルトの Site を明示的に読み込む GoogleApiSettings と MailchimpApiSettings の使用箇所を見つけ、次に各 caller にページコンテキストまたは request コンテキストがあるかを追跡します。dependency injection が必要な caller を特定します。完了条件は、コンテキストが利用可能な場合に、settings が multisite コンテキストで関連する Site を解決し、デフォルトの Site にフォールバックしないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- django, python
- 領域
- backend
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100