Skip to content

Commit 0659634

Browse files
committed
Add a basic folderish contenttype
1 parent 57a1d2f commit 0659634

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from plone.dexterity.content import Container
2+
3+
class ExperimentalDoodleFolder(Container):
4+
"""Folderish Doodle container (MVP)"""
5+
# Marker for the folderish doodle type
6+
pass
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
"""Module where all interfaces, events and exceptions live."""
22

33
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
4+
from plone.autoform import directives as form
5+
from plone.supermodel import model
6+
from zope import schema
47

58

69
class IBrowserLayer(IDefaultBrowserLayer):
710
"""Marker interface that defines a browser layer."""
11+
12+
13+
# MVP: Folderish Doodle container schema interface
14+
class IExperimentalDoodleFolder(model.Schema):
15+
"""Folderish Doodle container (MVP)"""
16+
# Dublin Core fields (title, description) are included by default
17+
form.order_after(description='title')
18+
description = schema.Text(
19+
title="Description",
20+
required=False,
21+
)
22+
# Optionally, add a text field for body/content
23+
body = schema.Text(
24+
title="Body",
25+
required=False,
26+
)

0 commit comments

Comments
 (0)