Exemple #1
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 = {}
Exemple #2
0
 def __init__(self, *args, **kwargs):
     AbstractGenerator.__init__(self, *args, **kwargs)
     self.repls = {'generator': self}