Ignore:
Timestamp:
Apr 18, 2011 2:32:21 PM (13 years ago)
Author:
zidane
Message:

fixes pep8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/seo_configlet.py

    r2889 r3134  
    2727    exposeDCMetaTags = Bool( 
    2828        title=_("label_exposeDCMetaTags", 
    29                 default='Expose <abbr title="Dublin Core">DC</abbr> meta tags'), 
     29                default='Expose <abbr title="Dublin Core">DC</abbr> ' \ 
     30                'meta tags'), 
    3031        description=_("description_seo_dc_metatags", 
    31                 default='Controls if <abbr title="Dublin Core">DC</abbr> ' 
    32                     'metatags are exposed to page header. They include ' 
    33                     'DC.description, DC.type, DC.format, DC.creator and ' 
    34                     'others.'), 
     32                      default='Controls if <abbr title="Dublin Core">DC</abbr>' 
     33                      ' metatags are exposed to page header. They include ' 
     34                      'DC.description, DC.type, DC.format, DC.creator and ' 
     35                      'others.'), 
    3536        default=True, 
    3637        required=False) 
     
    4041                default='Meta tags order in the page.'), 
    4142        description=_("help_metatags_order", 
    42                 default='Fill in meta tags (one per line) in the order in which' 
    43                     ' they will appear on site source pages. Example: ' 
    44                     '"metaname accessor".'), 
     43                      default='Fill in meta tags (one per line) in the order ' 
     44                      'in which they will appear on site source pages. ' 
     45                      'Example: "metaname accessor".'), 
    4546        required=False) 
    4647 
     
    5657 
    5758    default_custom_metatags = List( 
    58         title=_("label_default_custom_metatags", default='Default custom metatags.'), 
     59        title=_("label_default_custom_metatags", 
     60                default='Default custom metatags.'), 
    5961        description=_("help_default_custom_metatags", 
    60                 default='Fill in custom metatag names (one per line) which will ' 
    61                     'appear on qseo_properties edit tab. Example: ' 
    62                     '"metaname|metacontent" or "metaname".'), 
    63         required=False) 
    64  
     62                      default='Fill in custom metatag names (one per line) ' \ 
     63                      'which will appear on qseo_properties edit tab. ' \ 
     64                      'Example: "metaname|metacontent" or "metaname".'), 
     65        required=False) 
    6566 
    6667 
     
    7576 
    7677    fields = List( 
    77         title=_("label_fields", default='Fields for keywords statistic calculation.'), 
    78         description=_("help_fields", 
    79                 default='Fill in filds (one per line) which statistics of keywords usage ' 
    80                     'should be calculated for.'), 
     78        title=_("label_fields", default='Fields for keywords statistic ' 
     79                'calculation.'), 
     80        description=_("help_fields", default='Fill in filds (one per line)' 
     81                      'which statistics of keywords usage should ' 
     82                      'be calculated for.'), 
    8183        required=False) 
    8284 
    8385    stop_words = List( 
    8486        title=_("label_stop_words", default='Stop words.'), 
    85         description=_("help_stop_words", 
    86                 default='Fill in stop words (one per line) which will ' 
    87                     'be excluded from kewords statistics calculation.'), 
     87        description=_("help_stop_words", default='Fill in stop words ' 
     88                      '(one per line) which will be excluded from kewords ' 
     89                      'statistics calculation.'), 
    8890        required=False) 
    8991 
     
    120122        self.encoding = pprop.site_properties.default_charset 
    121123 
    122  
    123124    def getExposeDC(self): 
    124125        return self.siteprops.getProperty('exposeDCMetaTags') 
     
    146147 
    147148    exposeDCMetaTags = property(getExposeDC, setExposeDC) 
    148     default_custom_metatags = ProxyFieldProperty(ISEOConfigletSchema['default_custom_metatags']) 
     149    seo_default_custom_metatag = ISEOConfigletSchema['default_custom_metatags'] 
     150    default_custom_metatags = ProxyFieldProperty(seo_default_custom_metatag) 
    149151    metatags_order = ProxyFieldProperty(ISEOConfigletSchema['metatags_order']) 
    150152    types_seo_enabled = property(getTypesSEOEnabled, setTypesSEOEnabled) 
     
    152154    fields = ProxyFieldProperty(ISEOConfigletSchema['fields']) 
    153155    stop_words = ProxyFieldProperty(ISEOConfigletSchema['stop_words']) 
    154     external_keywords_test = ProxyFieldProperty(ISEOConfigletSchema['external_keywords_test']) 
     156    seo_external_keywords_test = ISEOConfigletSchema['external_keywords_test'] 
     157    external_keywords_test = ProxyFieldProperty(seo_external_keywords_test) 
    155158 
    156159 
    157160class Text2ListWidget(TextAreaWidget): 
    158161    height = 5 
    159     splitter = re.compile(u'\\r?\\n', re.S|re.U) 
     162    splitter = re.compile(u'\\r?\\n', re.S | re.U) 
    160163 
    161164    def _toFieldValue(self, input): 
     
    166169 
    167170    def _toFormValue(self, value): 
    168         if value == self.context.missing_value or value == self.context._type(): 
     171        if value == self.context.missing_value or \ 
     172           value == self.context._type(): 
    169173            return self._missing 
    170174        else: 
     
    181185advancedset.label = _(u'label_seoadvanced', default=u'Advanced') 
    182186 
     187 
    183188class SEOConfiglet(ControlPanelForm): 
    184189 
    185190    form_fields = FormFieldsets(baseset, advancedset) 
     191    type_seo_enabled = MultiCheckBoxThreeColumnWidget 
    186192 
    187193    form_fields['default_custom_metatags'].custom_widget = Text2ListWidget 
    188194    form_fields['metatags_order'].custom_widget = Text2ListWidget 
    189     form_fields['types_seo_enabled'].custom_widget = MultiCheckBoxThreeColumnWidget 
    190     form_fields['types_seo_enabled'].custom_widget.cssClass='label' 
     195    form_fields['types_seo_enabled'].custom_widget = type_seo_enabled 
     196    form_fields['types_seo_enabled'].custom_widget.cssClass = 'label' 
    191197    form_fields['fields'].custom_widget = Text2ListWidget 
    192198    form_fields['stop_words'].custom_widget = Text2ListWidget 
     
    195201    description = _("seo_configlet_description", default="You can select what " 
    196202                    "content types are qSEOptimizer-enabled, and control if " 
    197                     "Dublin Core metatags are exposed in the header of content " 
    198                     "pages.") 
     203                    "Dublin Core metatags are exposed in the header of content" 
     204                    " pages.") 
    199205    form_name = _("") 
Note: See TracChangeset for help on using the changeset viewer.