Extensible blocks
@jlchilders11 đang làm issue này rồi.
Từ ngày 17/11/2021.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem?
The blocks provided by coderedcms are great but they are difficult to extend consistently. E.g. adding a code block to the CONTENT_STREAMBLOCKS is currently only possible by overriding the body in all of the page models where this is required.
Describe the solution you'd like
#43 hinted on a solution that has so far not been implemented (correct me if I'm wrong). It would probably require all *_STREAMBLOCK globals in blocks/__init__.py to be converted to functions that will assemble the list of blocks depending on settings during the model construction. The setting could be a dictionary with entries pointing to a module with global list variables, e.g. something like this:
ADDITIONAL_BLOCKS = 'website.blocks' # eg. contains CONTENT_STREAMBLOCKS
Describe alternatives you've considered
See example with body above.
Additional context
I can give this a go and push a PR if you think this would be the right way to do this.
- Ngôn ngữ chính
- Python
- Star
- 763
- Fork
- 154
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coderedcorp/coderedcms
-
Type: Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
coderedcorp/coderedcms#714 ·
-
Typo in accordion_block.htmlĐang mởType: Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
coderedcorp/coderedcms#711 ·
-
Type: Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
coderedcorp/coderedcms#713 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
coderedcorp/coderedcms#710 · 4 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
coderedcorp/coderedcms#709 ·
Tất cả issue của coderedcorp/coderedcms
Issue tương tự
-
Claiming namespace `apoint`Đang mởnamespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
EclipseFdn/open-vsx.org#13573 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
collective/icalendar#1854 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rancher/rancher-ai-agent#412 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TUDelftGeodesy/DePSI#134 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
HenriquesLab/rxiv-maker#335 ·