Changeset 1781 in products for quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/adapters.py
- Timestamp:
- Feb 18, 2010 6:22:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/adapters.py
r1742 r1781 11 11 from quintagroup.seoptimizer.interfaces import IMetaKeywords, IMappingMetaTags 12 12 13 METADATA_MAPS = dict([ 14 ("DC.publisher", "Publisher"), 15 ("DC.description", "Description"), 16 ("DC.contributors", "Contributors"), 17 ("DC.creator", "Creator"), 18 ("DC.format", "Format"), 19 ("DC.rights", "Rights"), 20 ("DC.language", "Language"), 21 ("DC.date.modified", "ModificationDate"), 22 ("DC.date.created", "CreationDate"), 23 ("DC.type", "Type"), 24 ("DC.subject", "Subject"), 25 ("DC.distribution", "seo_distribution"), 26 ("description", "seo_description"), 27 ("keywords", "meta_keywords"), 28 ("robots", "seo_robots"), 29 ("distribution", "seo_distribution")]) 13 30 14 31 class MetaKeywordsAdapter(object): … … 45 62 metadata_name = SortedDict() 46 63 if self.seo_props: 47 pmn = self.seo_props.getProperty('metatags_order' )48 pmn = pmn and pmn or ''49 for mt in [mt.split(' ') for mt in pmn if len(mt.split(' '))==2]:50 metadata_name[mt[0]] = mt[1]64 pmn = self.seo_props.getProperty('metatags_order', ()) 65 for mt in pmn: 66 if METADATA_MAPS.has_key(mt): 67 metadata_name[mt] = METADATA_MAPS[mt] 51 68 return metadata_name 52 69
Note: See TracChangeset
for help on using the changeset viewer.