Back to index

plone3  3.1.7
FAQQuestion.py
Go to the documentation of this file.
00001 # File: FAQQuestion.py
00002 """\
00003 unknown
00004 
00005 RCS-ID $Id: FAQQuestion.py,v 1.1 2005/04/20 15:43:37 duncanb Exp $
00006 """
00007 # Copyright (c) 2005 by unknown
00008 #
00009 # Generated: Wed Apr 20 15:10:54 2005
00010 # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/
00011 #
00012 # GNU General Public Licence (GPL)
00013 # 
00014 # This program is free software; you can redistribute it and/or modify it under
00015 # the terms of the GNU General Public License as published by the Free Software
00016 # Foundation; either version 2 of the License, or (at your option) any later
00017 # version.
00018 # This program is distributed in the hope that it will be useful, but WITHOUT
00019 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00020 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00021 # details.
00022 # You should have received a copy of the GNU General Public License along with
00023 # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00024 # Place, Suite 330, Boston, MA  02111-1307  USA
00025 #
00026 __author__  = 'unknown <unknown>'
00027 __docformat__ = 'plaintext'
00028 
00029 from AccessControl import ClassSecurityInfo
00030 from Products.Archetypes.atapi import *
00031 from Products.CMFDynamicViewFTI.fti import DynamicViewTypeInformation
00032 
00033 
00034 ##code-section module-header #fill in your manual code here
00035 ##/code-section module-header
00036 
00037 
00038 class FAQQuestion(BaseContent):
00039     security = ClassSecurityInfo()
00040     portal_type = meta_type = 'FAQQuestion' 
00041     archetype_name = 'Question'   #this name appears in the 'add' box 
00042     allowed_content_types = [] 
00043     _at_fti_meta_type = DynamicViewTypeInformation.meta_type
00044 
00045     __implements__ = getattr(BaseContent,'__implements__',())
00046 
00047     ##code-section class-header #fill in your manual code here
00048     ##/code-section class-header
00049 
00050     schema=BaseSchema + Schema((
00051         StringField('section',
00052             widget=StringWidget(description='Enter a value for section.',
00053                 description_msgid='FAQ_help_section',
00054                 i18n_domain='FAQ',
00055                 label='Section',
00056                 label_msgid='FAQ_label_section',
00057             ),
00058         ),
00059         
00060         StringField('title',
00061             widget=StringWidget(description='Enter a value for title.',
00062                 description_msgid='FAQ_help_title',
00063                 i18n_domain='FAQ',
00064                 label='Title',
00065                 label_msgid='FAQ_label_title',
00066             ),
00067         ),
00068         
00069         TextField('answer',
00070             widget=TextAreaWidget(description='Enter a value for answer.',
00071                 description_msgid='FAQ_help_answer',
00072                 i18n_domain='FAQ',
00073                 label='Answer',
00074                 label_msgid='FAQ_label_answer',
00075             ),
00076         ),
00077         
00078 
00079         ReferenceField('links',
00080             allowed_types=(),
00081             multiValued=1,
00082             relationship='links',
00083             widget=ReferenceWidget(description='Enter a value for links.',
00084                 description_msgid='FAQ_help_links',
00085                 i18n_domain='FAQ',
00086                 label='Links',
00087                 label_msgid='FAQ_label_links',
00088             ),
00089         ),
00090         
00091     ),
00092     )
00093 
00094     #Methods
00095 
00096 
00097     # uncomment lines below when you need
00098     factory_type_information={
00099         'allowed_content_types':allowed_content_types,
00100         'allow_discussion': 0,
00101         #'content_icon':'FAQQuestion.gif',
00102         'immediate_view':'base_view',
00103         'global_allow':0,
00104         'filter_content_types':1,
00105         }
00106 
00107         
00108     actions=  (
00109         
00110 
00111        {'action':      '''string:$object_url/view''',
00112         'category':    '''object''',
00113         'id':          'view',
00114         'name':        'view',
00115         'permissions': ('''View''',),
00116         'condition'  : 'python:1'},
00117         
00118 
00119           )
00120         
00121 
00122 registerType(FAQQuestion)
00123 # end of class FAQQuestion
00124 
00125 ##code-section module-footer #fill in your manual code here
00126 ##/code-section module-footer
00127 
00128