-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC 66: EnumBlock #66
Conversation
We discussed this at the team meeting today. Nobody objected to the idea in principle, but @gasman thought the name would be confusing. The name comes from Rust's Any thoughts on |
|
Planning on closing this one, it didn't exactly get a very enthusiastic response when I presented it so I'm going to focus on other things |
Reopening as I feel like this is a missing piece in our set of block types and I'd like to push for it to be included in Wagtail! I think there are three fundamental data structures that should make up a StreamField:
Adding StreamBlock([
('type_a', TypeABlock()),
('type_b', TypeBBlock()),
]) ListBlock(UnionBlock([
('type_a', TypeABlock()),
('type_b', TypeBBlock()),
])) This would mean all sequences are managed by the same type. I'm not saying that we should drop support for A use for class LinkedImageBlock(StructBlock):
image = ImageChooserBlock()
link = UnionBlock([
('internal', PageChooserBlock()),
('external', URLBlock()),
]) |
Rendered