Browse Source

cleanup + fix dep

Guénaël Muller 7 years ago
parent
commit
697cd072a2
2 changed files with 8 additions and 15 deletions
  1. 2 0
      setup.py
  2. 6 15
      tracim/models/data.py

+ 2 - 0
setup.py View File

@@ -19,12 +19,14 @@ requires = [
19 19
     'transaction',
20 20
     'zope.sqlalchemy',
21 21
     'waitress',
22
+    'filedepot',
22 23
 ]
23 24
 
24 25
 tests_require = [
25 26
     'WebTest >= 1.3.1',  # py3 compat
26 27
     'pytest',
27 28
     'pytest-cov',
29
+    'nose',
28 30
 ]
29 31
 
30 32
 setup(

+ 6 - 15
tracim/models/data.py View File

@@ -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'