|
@@ -43,31 +43,21 @@ DEFAULT_PROPERTIES = dict(
|
43
|
43
|
)
|
44
|
44
|
|
45
|
45
|
|
46
|
|
-class BreadcrumbItem(object):
|
47
|
|
-
|
48
|
|
- def __init__(self, icon_string: str, label: str, url: str, is_active: bool = False):
|
49
|
|
- """
|
50
|
|
- A BreadcrumbItem contains minimal information required to build a breadcrumb
|
51
|
|
- icon_string: this is the Tango related id, eg 'places/remote-folder'
|
52
|
|
- """
|
53
|
|
- self.icon = icon_string
|
54
|
|
- self.label = label
|
55
|
|
- self.url = url
|
56
|
|
- self.is_active =is_active
|
57
|
|
-
|
58
|
46
|
class Workspace(DeclarativeBase):
|
59
|
47
|
|
60
|
48
|
__tablename__ = 'workspaces'
|
61
|
49
|
|
62
|
50
|
workspace_id = Column(Integer, Sequence('seq__workspaces__workspace_id'), autoincrement=True, primary_key=True)
|
63
|
51
|
|
64
|
|
- label = Column(Unicode(1024), unique=False, nullable=False, default='')
|
|
52
|
+ label = Column(Unicode(1024), unique=False, nullable=False, default='')
|
65
|
53
|
description = Column(Text(), unique=False, nullable=False, default='')
|
66
|
54
|
calendar_enabled = Column(Boolean, unique=False, nullable=False, default=False)
|
67
|
55
|
|
68
|
|
- # Default value datetime.utcnow, see: http://stackoverflow.com/a/13370382/801924 (or http://pastebin.com/VLyWktUn)
|
|
56
|
+ # Default value datetime.utcnow,
|
|
57
|
+ # see: http://stackoverflow.com/a/13370382/801924 (or http://pastebin.com/VLyWktUn)
|
69
|
58
|
created = Column(DateTime, unique=False, nullable=False, default=datetime.utcnow)
|
70
|
|
- # Default value datetime.utcnow, see: http://stackoverflow.com/a/13370382/801924 (or http://pastebin.com/VLyWktUn)
|
|
59
|
+ # Default value datetime.utcnow,
|
|
60
|
+ # see: http://stackoverflow.com/a/13370382/801924 (or http://pastebin.com/VLyWktUn)
|
71
|
61
|
updated = Column(DateTime, unique=False, nullable=False, default=datetime.utcnow)
|
72
|
62
|
|
73
|
63
|
is_deleted = Column(Boolean, unique=False, nullable=False, default=False)
|
|
@@ -123,6 +113,7 @@ class Workspace(DeclarativeBase):
|
123
|
113
|
if not content_types or child.type in content_types:
|
124
|
114
|
yield child
|
125
|
115
|
|
|
116
|
+
|
126
|
117
|
class UserRoleInWorkspace(DeclarativeBase):
|
127
|
118
|
|
128
|
119
|
__tablename__ = 'user_workspace'
|