Example #1
0
    def _initMustache(self, args=None, req=None):
        from lr.lib import helpers as h
        
        vars = {}

        if req == None:
            req = request
            
        if args != None:
            params = args
            
        vars["response_date"] = datetime.utcnow().isoformat()
        vars["path_url"] = req.path_url
        if params.has_key("by_doc_ID"):
            vars["by_doc_ID"] = params["by_doc_ID"]
        if params.has_key("by_resource_ID"):
            vars["by_resource_ID"] = params["by_resource_ID"]
        if params.has_key("metadataPrefix"):
            vars["metadataPrefix"] = params["metadataPrefix"]
        if params.has_key("from"):
            vars["from_date"] = h.harvestTimeFormat(params["from"])
        if params.has_key("until"):
            vars["until_date"] = h.harvestTimeFormat(params["until"])
        if params.has_key("identifier"):
            vars["identifier"] = params["identifier"]
        return vars
 def __parse_date(self,date):
     last_update = helpers.convertToISO8601UTC(date)    
     last_update_date = iso8601.parse_date(date)
     return helpers.harvestTimeFormat(last_update)
Example #3
0
 def __parse_date(self, date):
     last_update = helpers.convertToISO8601UTC(date)
     last_update_date = iso8601.parse_date(date)
     return helpers.harvestTimeFormat(last_update)