Example #1
0
 def add(self, type, name, url):
     a = {"id":None,
          "type": type,
          "name": name,
          "url": url,
          "update_time":None,
          "last_update":None,
          "cache_file":None,
          "cache_type":None,
          "output_scheme":None,
          "map_rules":None,
          "logon":None,
          "password":None
               }
     q = Feed(**a)
     q.save()
Example #2
0
 def add(self, type, name, url):
     a = {"id":None,
          "type": type,
          "name": name,
          "url": url,
          "update_time":None,
          "last_update":None,
          "cache_file":None,
          "cache_type":None,
          "output_scheme":None,
          "map_rules":None,
          "logon":None,
          "password":None
               }
     q = Feed(**a)
     q.save()
     
Example #3
0
 def POST(self, type, name, url):
     a = {"id":None,
          "type": type,
          "name": name,
          "url": url,
          "update_time":3600,
          "last_update":0,
          "cache_file":None,
          "cache_type":None,
          "output_scheme":None,
          "map_rules":None,
          "logon":None,
          "password":None
               }
     q = Feed(**a)
     q.save()
     cherrypy.response.status = '201 Created'
Example #4
0
 def POST(self, type, name, url, utime, login = None, passwd = None):
     a = {"id":None,
          "enable": 0,
          "type": type,
          "name": name,
          "url": url,
          "update_time":int(utime),
          "last_update":0,
          "cache_data":0,
          "cache_type":None,
          "output_scheme":None,
          "map_rules":None,
          "logon":login,
          "password":passwd
               }
     q = Feed(**a)
     q.save()
     #if enable == "1":
     #    self.cntrl.addJob(q)
     cherrypy.response.status = '201 Created'
Example #5
0
 def POST(self, type, name, url, utime, login=None, passwd=None):
     a = {
         "id": None,
         "enable": 0,
         "type": type,
         "name": name,
         "url": url,
         "update_time": int(utime),
         "last_update": 0,
         "cache_data": 0,
         "cache_type": None,
         "output_scheme": None,
         "map_rules": None,
         "logon": login,
         "password": passwd
     }
     q = Feed(**a)
     q.save()
     #if enable == "1":
     #    self.cntrl.addJob(q)
     cherrypy.response.status = '201 Created'