Skip to content

Commit c87cfcb

Browse files
author
Hervé Cauwelier
committed
delete undesired "data" in properties
1 parent 45c97c3 commit c87cfcb

File tree

4 files changed

+58
-6
lines changed

4 files changed

+58
-6
lines changed

Diff for: __init__.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,30 @@
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919

20+
# Import from the Standard Library
21+
from sys import argv
22+
2023
# Import from docutils
2124
import docutils
2225

2326
# Import from itools
2427
from itools.core import get_abspath
2528

2629
# Import from ikaaro
27-
from ikaaro.registry import register_document_type
2830
from ikaaro.skins import register_skin
31+
32+
# Import from wiki
2933
from folder import WikiFolder
30-
from page import WikiPage
3134

3235

3336
# 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
3643

37-
# Register document type
38-
register_document_type(WikiFolder)
44+
# Silent pyflakes
45+
docutils
46+
WikiFolder

Diff for: folder.py

+7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
from ikaaro.file import File
2626
from ikaaro.folder import Folder
2727
from ikaaro.folder_views import GoToSpecificDocument
28+
from ikaaro.registry import register_document_type
2829
from ikaaro.resource_views import DBResource_Edit
30+
31+
# Import from wiki
2932
from folder_views import WikiMenu
3033
from page import WikiPage
3134

@@ -60,3 +63,7 @@ def get_document_types(self):
6063
view = GoToSpecificDocument(specific_document='FrontPage')
6164
edit = DBResource_Edit(title=MSG(u"Edit Wiki"))
6265

66+
67+
68+
# Register document type
69+
register_document_type(WikiFolder)

Diff for: obsolete.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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)

Diff for: page.py

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def run(self):
132132

133133
class WikiPage(Text):
134134
class_id = 'WikiPage'
135+
class_version = '20090123'
135136
class_title = MSG(u"Wiki Page")
136137
class_description = MSG(u"Wiki contents")
137138
class_icon16 = 'wiki/WikiPage16.png'

0 commit comments

Comments
 (0)