New node_type page

Mostly to be used to create static pages (about, ToS, etc).
This commit is contained in:
Francesco Siddi 2016-03-24 15:11:55 +01:00
parent 79918c26b6
commit 0e01c925bd

View 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': {}
}