示例#1
0
 def __init__(self, *args, **kwargs):
     Tool._appy_clean()
     Generator.__init__(self, *args, **kwargs)
     # Set our own Descriptor classes
     self.descriptorClasses['class'] = ClassDescriptor
     # Create Tool, User, Group, Translation and Page instances.
     self.tool = ToolClassDescriptor(Tool, self)
     self.user = UserClassDescriptor(User, self)
     self.group = GroupClassDescriptor(Group, self)
     self.translation = TranslationClassDescriptor(Translation, self)
     self.page = PageClassDescriptor(Page, self)
     # i18n labels to generate
     self.labels = po.PoMessages()
示例#2
0
 def __init__(self, *args, **kwargs):
     Tool._appy_clean()
     Generator.__init__(self, *args, **kwargs)
     # Set our own Descriptor classes
     self.descriptorClasses['class'] = ClassDescriptor
     # Create Tool, User, Group, Translation and Page instances.
     self.tool = ToolClassDescriptor(Tool, self)
     self.user = UserClassDescriptor(User, self)
     self.group = GroupClassDescriptor(Group, self)
     self.translation = TranslationClassDescriptor(Translation, self)
     self.page = PageClassDescriptor(Page, self)
     # i18n labels to generate
     self.labels = po.PoMessages()
示例#3
0
 def __init__(self, *args, **kwargs):
     Tool._appy_clean()
     Generator.__init__(self, *args, **kwargs)
     # Set our own Descriptor classes
     self.descriptorClasses['class'] = ClassDescriptor
     # Create our own Tool, User, Group and Translation instances
     self.tool = ToolClassDescriptor(Tool, self)
     self.user = UserClassDescriptor(User, self)
     self.group = GroupClassDescriptor(Group, self)
     self.translation = TranslationClassDescriptor(Translation, self)
     # i18n labels to generate
     self.labels = []  # i18n labels
     self.referers = {}
示例#4
0
 def __init__(self, *args, **kwargs):
     Tool._appy_clean()
     AbstractGenerator.__init__(self, *args, **kwargs)
     # Set our own Descriptor classes
     self.descriptorClasses['class'] = ClassDescriptor
     # Create our own Tool, User and Translation instances
     self.tool = ToolClassDescriptor(Tool, self)
     self.user = UserClassDescriptor(User, self)
     self.translation = TranslationClassDescriptor(Translation, self)
     # i18n labels to generate
     self.labels = [] # i18n labels
     self.toolInstanceName = 'portal_%s' % self.applicationName.lower()
     self.portletName = '%s_portlet' % self.applicationName.lower()
     self.skinsFolder = 'skins/%s' % self.applicationName
     # The following dict, pre-filled in the abstract generator, contains a
     # series of replacements that need to be applied to file templates to
     # generate files.
     commonMethods = COMMON_METHODS % \
                     (self.toolInstanceName, self.applicationName)
     self.repls.update(
         {'toolInstanceName': self.toolInstanceName,
         'commonMethods': commonMethods})
     self.referers = {}