source: products/quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/mobilesitemapview.py @ 3163

Last change on this file since 3163 was 3163, checked in by zidane, 9 years ago

fixes pyflakes and pylint

  • Property svn:eol-style set to native
File size: 722 bytes
Line 
1from DateTime import DateTime
2from quintagroup.plonegooglesitemaps.browser.commonview \
3    import CommonSitemapView, implements, ISitemapView
4
5MOBILE_INTERFACES = ['quintagroup.mobileextender.interfaces.IMobile', ]
6
7
8class MobileSitemapView(CommonSitemapView):
9    """
10    Mobile Sitemap browser view
11    """
12    implements(ISitemapView)
13
14    additional_maps = (
15        ('modification_date', lambda x: DateTime(x.ModificationDate).HTML4()),
16    )
17
18    def getFilteredObjects(self):
19        return self.portal_catalog(
20            path=self.search_path,
21            portal_type=self.context.getPortalTypes(),
22            review_state=self.context.getStates(),
23            object_provides=MOBILE_INTERFACES,
24            )
Note: See TracBrowser for help on using the repository browser.