Use soft-delete for nodes
This commit is contained in:
parent
b9367f9944
commit
3e8494e3bf
@ -11,7 +11,6 @@ node_type_comment = {
|
|||||||
'type': 'string',
|
'type': 'string',
|
||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'deleted',
|
|
||||||
'flagged',
|
'flagged',
|
||||||
'edited'
|
'edited'
|
||||||
],
|
],
|
||||||
|
@ -15,7 +15,6 @@ node_type_group = {
|
|||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'pending',
|
'pending',
|
||||||
'deleted'
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'notes': {
|
'notes': {
|
||||||
|
@ -15,7 +15,6 @@ node_type_group_texture = {
|
|||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'pending',
|
'pending',
|
||||||
'deleted'
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,6 @@ node_type_page = {
|
|||||||
'type': 'string',
|
'type': 'string',
|
||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'deleted',
|
|
||||||
'pending'
|
'pending'
|
||||||
],
|
],
|
||||||
'default': 'pending'
|
'default': 'pending'
|
||||||
|
@ -15,7 +15,6 @@ node_type_post = {
|
|||||||
'type': 'string',
|
'type': 'string',
|
||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'deleted',
|
|
||||||
'pending'
|
'pending'
|
||||||
],
|
],
|
||||||
'default': 'pending'
|
'default': 'pending'
|
||||||
|
@ -58,7 +58,6 @@ node_type_project = {
|
|||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'pending',
|
'pending',
|
||||||
'deleted'
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
# Logo
|
# Logo
|
||||||
|
@ -13,7 +13,6 @@ node_type_texture = {
|
|||||||
'published',
|
'published',
|
||||||
'pending',
|
'pending',
|
||||||
'processing',
|
'processing',
|
||||||
'deleted'
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
# Used for sorting within the context of a group
|
# Used for sorting within the context of a group
|
||||||
|
@ -579,7 +579,6 @@ projects_schema = {
|
|||||||
'allowed': [
|
'allowed': [
|
||||||
'published',
|
'published',
|
||||||
'pending',
|
'pending',
|
||||||
'deleted'
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
# Latest nodes being edited
|
# Latest nodes being edited
|
||||||
@ -701,6 +700,7 @@ nodes = {
|
|||||||
'schema': nodes_schema,
|
'schema': nodes_schema,
|
||||||
'public_methods': ['GET'],
|
'public_methods': ['GET'],
|
||||||
'public_item_methods': ['GET'],
|
'public_item_methods': ['GET'],
|
||||||
|
'soft_delete': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
@ -40,7 +40,7 @@ EXAMPLE_PROJECT = {
|
|||||||
u'name': u'Textures',
|
u'name': u'Textures',
|
||||||
u'node_types': [{u'description': u'Group for texture node type',
|
u'node_types': [{u'description': u'Group for texture node type',
|
||||||
u'dyn_schema': {u'order': {u'type': u'integer'},
|
u'dyn_schema': {u'order': {u'type': u'integer'},
|
||||||
u'status': {u'allowed': [u'published', u'pending', u'deleted'],
|
u'status': {u'allowed': [u'published', u'pending'],
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'url': {u'type': u'string'}},
|
u'url': {u'type': u'string'}},
|
||||||
u'form_schema': {u'order': {}, u'status': {}, u'url': {}},
|
u'form_schema': {u'order': {}, u'status': {}, u'url': {}},
|
||||||
@ -59,7 +59,7 @@ EXAMPLE_PROJECT = {
|
|||||||
{u'description': u'Generic group node type edited',
|
{u'description': u'Generic group node type edited',
|
||||||
u'dyn_schema': {u'notes': {u'maxlength': 256, u'type': u'string'},
|
u'dyn_schema': {u'notes': {u'maxlength': 256, u'type': u'string'},
|
||||||
u'order': {u'type': u'integer'},
|
u'order': {u'type': u'integer'},
|
||||||
u'status': {u'allowed': [u'published', u'pending', u'deleted'],
|
u'status': {u'allowed': [u'published', u'pending'],
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'url': {u'type': u'string'}},
|
u'url': {u'type': u'string'}},
|
||||||
u'form_schema': {u'notes': {}, u'order': {}, u'status': {}, u'url': {}},
|
u'form_schema': {u'notes': {}, u'order': {}, u'status': {}, u'url': {}},
|
||||||
@ -101,8 +101,7 @@ EXAMPLE_PROJECT = {
|
|||||||
u'order': {u'type': u'integer'},
|
u'order': {u'type': u'integer'},
|
||||||
u'status': {u'allowed': [u'published',
|
u'status': {u'allowed': [u'published',
|
||||||
u'pending',
|
u'pending',
|
||||||
u'processing',
|
u'processing'],
|
||||||
u'deleted'],
|
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'tags': {u'schema': {u'type': u'string'}, u'type': u'list'}},
|
u'tags': {u'schema': {u'type': u'string'}, u'type': u'list'}},
|
||||||
u'form_schema': {u'attachments': {u'visible': False},
|
u'form_schema': {u'attachments': {u'visible': False},
|
||||||
@ -148,8 +147,7 @@ EXAMPLE_PROJECT = {
|
|||||||
u'weight': {u'type': u'integer'}},
|
u'weight': {u'type': u'integer'}},
|
||||||
u'type': u'dict'},
|
u'type': u'dict'},
|
||||||
u'type': u'list'},
|
u'type': u'list'},
|
||||||
u'status': {u'allowed': [u'published', u'deleted', u'flagged',
|
u'status': {u'allowed': [u'published', u'flagged', u'edited'],
|
||||||
u'edited'],
|
|
||||||
u'type': u'string'}},
|
u'type': u'string'}},
|
||||||
u'form_schema': {u'confidence': {},
|
u'form_schema': {u'confidence': {},
|
||||||
u'content': {},
|
u'content': {},
|
||||||
@ -203,7 +201,7 @@ EXAMPLE_PROJECT = {
|
|||||||
u'minlength': 5,
|
u'minlength': 5,
|
||||||
u'required': True,
|
u'required': True,
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'status': {u'allowed': [u'published', u'deleted', u'pending'],
|
u'status': {u'allowed': [u'published', u'pending'],
|
||||||
u'default': u'pending',
|
u'default': u'pending',
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'url': {u'type': u'string'}},
|
u'url': {u'type': u'string'}},
|
||||||
@ -243,8 +241,7 @@ EXAMPLE_PROJECT = {
|
|||||||
u'resolution': {u'type': u'string'},
|
u'resolution': {u'type': u'string'},
|
||||||
u'stat_ensure_file_existsus': {u'allowed': [u'published',
|
u'stat_ensure_file_existsus': {u'allowed': [u'published',
|
||||||
u'pending',
|
u'pending',
|
||||||
u'processing',
|
u'processing'],
|
||||||
u'deleted'],
|
|
||||||
u'type': u'string'},
|
u'type': u'string'},
|
||||||
u'tags': {u'schema': {u'type': u'string'}, u'type': u'list'}},
|
u'tags': {u'schema': {u'type': u'string'}, u'type': u'list'}},
|
||||||
u'form_schema': {u'aspect_ratio': {},
|
u'form_schema': {u'aspect_ratio': {},
|
||||||
|
@ -113,7 +113,7 @@ class ProjectEditTest(AbstractProjectTest):
|
|||||||
put_project['name'] = u'โครงการปั่นเมฆ'
|
put_project['name'] = u'โครงการปั่นเมฆ'
|
||||||
put_project['summary'] = u'Это переведена на Google'
|
put_project['summary'] = u'Это переведена на Google'
|
||||||
put_project['is_private'] = False
|
put_project['is_private'] = False
|
||||||
put_project['status'] = 'deleted'
|
put_project['status'] = 'pending'
|
||||||
put_project['category'] = 'software'
|
put_project['category'] = 'software'
|
||||||
put_project['user'] = other_user_id
|
put_project['user'] = other_user_id
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ class ProjectEditTest(AbstractProjectTest):
|
|||||||
put_project['name'] = u'โครงการปั่นเมฆ'
|
put_project['name'] = u'โครงการปั่นเมฆ'
|
||||||
put_project['summary'] = u'Это переведена на Google'
|
put_project['summary'] = u'Это переведена на Google'
|
||||||
put_project['is_private'] = False
|
put_project['is_private'] = False
|
||||||
put_project['status'] = 'deleted'
|
put_project['status'] = 'pending'
|
||||||
put_project['category'] = 'software'
|
put_project['category'] = 'software'
|
||||||
put_project['user'] = other_user_id
|
put_project['user'] = other_user_id
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user