File tree 4 files changed +58
-6
lines changed
4 files changed +58
-6
lines changed Original file line number Diff line number Diff line change 17
17
# You should have received a copy of the GNU General Public License
18
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
20
+ # Import from the Standard Library
21
+ from sys import argv
22
+
20
23
# Import from docutils
21
24
import docutils
22
25
23
26
# Import from itools
24
27
from itools .core import get_abspath
25
28
26
29
# Import from ikaaro
27
- from ikaaro .registry import register_document_type
28
30
from ikaaro .skins import register_skin
31
+
32
+ # Import from wiki
29
33
from folder import WikiFolder
30
- from page import WikiPage
31
34
32
35
33
36
# Register skin
34
- path = get_abspath ('ui' )
35
- register_skin ('wiki' , path )
37
+ register_skin ('wiki' , get_abspath ('ui' ))
38
+
39
+ # Updates
40
+ if argv [0 ].endswith ('icms-update.py' ):
41
+ import obsolete
42
+ obsolete
36
43
37
- # Register document type
38
- register_document_type (WikiFolder )
44
+ # Silent pyflakes
45
+ docutils
46
+ WikiFolder
Original file line number Diff line number Diff line change 25
25
from ikaaro .file import File
26
26
from ikaaro .folder import Folder
27
27
from ikaaro .folder_views import GoToSpecificDocument
28
+ from ikaaro .registry import register_document_type
28
29
from ikaaro .resource_views import DBResource_Edit
30
+
31
+ # Import from wiki
29
32
from folder_views import WikiMenu
30
33
from page import WikiPage
31
34
@@ -60,3 +63,7 @@ def get_document_types(self):
60
63
view = GoToSpecificDocument (specific_document = 'FrontPage' )
61
64
edit = DBResource_Edit (title = MSG (u"Edit Wiki" ))
62
65
66
+
67
+
68
+ # Register document type
69
+ register_document_type (WikiFolder )
Original file line number Diff line number Diff line change
1
+ # -*- coding: UTF-8 -*-
2
+ # Copyright (C) 2010 Hervé Cauwelier <[email protected] >
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+ # Import from the Standard Library
18
+
19
+ # Import from ikaaro
20
+ from ikaaro .registry import register_resource_class
21
+
22
+ # Import from wiki
23
+ from page import WikiPage
24
+
25
+
26
+ class ObsoleteWikiPage (WikiPage ):
27
+ class_schema_extensible = True
28
+
29
+
30
+ def update_20090123 (self ):
31
+ # Remove "data" property
32
+ self .del_property ('data' )
33
+
34
+
35
+
36
+ register_resource_class (ObsoleteWikiPage )
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ def run(self):
132
132
133
133
class WikiPage (Text ):
134
134
class_id = 'WikiPage'
135
+ class_version = '20090123'
135
136
class_title = MSG (u"Wiki Page" )
136
137
class_description = MSG (u"Wiki contents" )
137
138
class_icon16 = 'wiki/WikiPage16.png'
You can’t perform that action at this time.
0 commit comments