New node_type page
Mostly to be used to create static pages (about, ToS, etc).
This commit is contained in:
55
pillar/manage/node_types/page.py
Normal file
55
pillar/manage/node_types/page.py
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
from manage.node_types import _file_embedded_schema
|
||||||
|
|
||||||
|
node_type_page = {
|
||||||
|
'name': 'page',
|
||||||
|
'description': 'A single page',
|
||||||
|
'dyn_schema': {
|
||||||
|
# The page content (Markdown format)
|
||||||
|
'content': {
|
||||||
|
'type': 'string',
|
||||||
|
'minlength': 5,
|
||||||
|
'maxlength': 90000,
|
||||||
|
'required': True
|
||||||
|
},
|
||||||
|
'status': {
|
||||||
|
'type': 'string',
|
||||||
|
'allowed': [
|
||||||
|
'published',
|
||||||
|
'deleted',
|
||||||
|
'pending'
|
||||||
|
],
|
||||||
|
'default': 'pending'
|
||||||
|
},
|
||||||
|
'url': {
|
||||||
|
'type': 'string'
|
||||||
|
},
|
||||||
|
'attachments': {
|
||||||
|
'type': 'list',
|
||||||
|
'schema': {
|
||||||
|
'type': 'dict',
|
||||||
|
'schema': {
|
||||||
|
'field': {'type': 'string'},
|
||||||
|
'files': {
|
||||||
|
'type': 'list',
|
||||||
|
'schema': {
|
||||||
|
'type': 'dict',
|
||||||
|
'schema': {
|
||||||
|
'file': _file_embedded_schema,
|
||||||
|
'slug': {'type': 'string', 'minlength': 1},
|
||||||
|
'size': {'type': 'string'}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form_schema': {
|
||||||
|
'content': {},
|
||||||
|
'status': {},
|
||||||
|
'url': {},
|
||||||
|
'attachments': {'visible': False},
|
||||||
|
},
|
||||||
|
'parent': ['project', ],
|
||||||
|
'permissions': {}
|
||||||
|
}
|
Reference in New Issue
Block a user