Ignore:
Timestamp:
Aug 22, 2012 10:22:22 AM (8 years ago)
Author:
potar
Message:

Merged sitemap_date branch into trunk

Location:
quintagroup.plonegooglesitemaps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk

    • Property svn:mergeinfo
      •  

        old new  
        33/quintagroup.plonegooglesitemaps/branches/migratioin_product:2826-2839 
        44/quintagroup.plonegooglesitemaps/branches/plone4:2549-2553 
         5/quintagroup.plonegooglesitemaps/branches/sitemap_date:3481-3509 
        56/quintagroup.plonegooglesitemaps/branches/test_refactoring:2527-2536 
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/utils.py

    r3163 r3510  
    11from urllib2 import urlopen 
    2 from urllib  import quote as urlquote 
     2from urllib import quote as urlquote 
     3from DateTime import DateTime 
    34 
    45from Globals import DevelopmentMode 
    56#from OFS.ObjectManager import BadRequestException 
     7from Products.CMFCore.utils import getToolByName 
    68 
    79from quintagroup.plonegooglesitemaps import config 
     
    2022    sitemap_url = urlquote(resurl) 
    2123 
    22     g = urlopen('http://www.google.com/webmasters/tools/ping?sitemap=' + \ 
     24    g = urlopen('http://www.google.com/webmasters/tools/ping?sitemap=' + 
    2325                sitemap_url) 
    2426    g.read() 
     
    2628 
    2729    return 0 
     30 
     31 
     32def getDefaultPage(obj): 
     33    """ Method gets default page for object (folderish) """ 
     34    plone_tool = getToolByName(obj, 'plone_utils') 
     35    return plone_tool.getDefaultPage(obj) 
     36 
     37 
     38def isDefaultPage(obj): 
     39    """ If object is default page then return True""" 
     40    plone_tool = getToolByName(obj, 'plone_utils') 
     41    return plone_tool.isDefaultPage(obj) 
     42 
     43 
     44def dateTime(obj): 
     45    """ Method gets modification date """ 
     46    return DateTime(obj.ModificationDate()) 
Note: See TracChangeset for help on using the changeset viewer.