source: products/SimpleBlog/branches/plone-2.5/content/trackback.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1from Products.Archetypes.public import *
2from Products.ATContentTypes.content.base import ATCTContent
3from Products.ATContentTypes.content.schemata import ATContentTypeSchema
4#from Products.Archetypes.BaseContent import BaseContent
5#from Products.SimpleBlog.config import *
6
7schema = 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
23class 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
52registerType(TrackBack)
Note: See TracBrowser for help on using the repository browser.