1 | from Products.Archetypes.public import * |
---|
2 | from Products.ATContentTypes.content.base import ATCTContent |
---|
3 | from Products.ATContentTypes.content.schemata import ATContentTypeSchema |
---|
4 | #from Products.Archetypes.BaseContent import BaseContent |
---|
5 | #from Products.SimpleBlog.config import * |
---|
6 | |
---|
7 | schema = ATContentTypeSchema.copy() + Schema(( |
---|
8 | #schema = BaseSchema + Schema(( |
---|
9 | StringField('url', |
---|
10 | widget=StringWidget(label_msgid = 'label_url', |
---|
11 | description_msgid = 'help_url'), |
---|
12 | ), |
---|
13 | StringField('blog_name', |
---|
14 | widget=StringWidget(label_msgid = 'label_blog_name', |
---|
15 | description_msgid = 'help_blog_name'), |
---|
16 | ), |
---|
17 | TextField('excerpt', |
---|
18 | widget = RichWidget(label = "excerpt", |
---|
19 | label_msgid = "label_excerpt", |
---|
20 | i18n_domain = "plone")), |
---|
21 | )) |
---|
22 | |
---|
23 | class TrackBack(ATCTContent): |
---|
24 | """Track Back Info container |
---|
25 | title - title of track Back |
---|
26 | url - server ping url |
---|
27 | blog_name - blog-sender name |
---|
28 | excerpt - simplified content text |
---|
29 | """ |
---|
30 | # Standard content type setup |
---|
31 | portal_type = meta_type = archetype_name = 'TrackBack' |
---|
32 | #content_icon='entry_icon.gif' |
---|
33 | global_allow=1 ## Change to 0 !!! |
---|
34 | allow_discussion = 0 |
---|
35 | |
---|
36 | default_view = 'base_view' |
---|
37 | immediate_view = 'base_view' |
---|
38 | |
---|
39 | # Make sure we get title-to-id generation when an object is created |
---|
40 | _at_rename_after_creation = False |
---|
41 | |
---|
42 | def canSetDefaultPage(self): |
---|
43 | return False |
---|
44 | |
---|
45 | schema = schema |
---|
46 | # Override original ExtensibleMetadata method |
---|
47 | # for prevent "Unauthorized" exception raicing |
---|
48 | def allowDiscussion(self, allowDiscussion=None, **kw): |
---|
49 | """ """ |
---|
50 | return None |
---|
51 | |
---|
52 | registerType(TrackBack) |
---|