Exemplo n.º 1
0
	def get(self):
		if self.param('delid') == '':
			listit = FeedList()
			querys = listit.all()
			feedDetal = ''
		else:
			listit = FeedList()
			querys = listit.all().filter('name =', self.param('delid')).fetch(1)
			for query in querys:
			    query.delete()
			self.redirect('/admin/feedblog/setup')
			self.response.set_status(301)
		self.template_vals.update({'list':querys})
		self.template_vals.update({'categories':Category.all()})
		content = template.render('plugins/feedblog/feedblog.html', self.template_vals)
		self.render2('views/admin/setup_base.html', {'m_id':'feedblog_setup', 'content':content})
Exemplo n.º 2
0
    def __getcategorykey(self, feed_url, defDir):

        resultkry = []

        feedslug = FeedList.all().filter('feedurl = ', feed_url)
        if feedslug != None:
            resultkey = self.__changdir(feedslug[0].acategory)

        else:
            logging.warning('the item of id is  %s, and change it to %s',
                            feedslug.id, defDir)
            resultkey = self.__changdir(defDir)

        return resultkey
Exemplo n.º 3
0
		def __getcategorykey(self, feed_url, defDir):

				resultkry = []

				feedslug = FeedList.all().filter('feedurl = ', feed_url)
				if feedslug != None:
						resultkey = self.__changdir(feedslug[0].acategory)

				else:
						logging.warning('the item of id is  %s, and change it to %s', feedslug.id, defDir)
						resultkey = self.__changdir(defDir)



				return resultkey
Exemplo n.º 4
0
 def __store_article(self, feed):
     listits = FeedList()
     try:
         entry = Entry(key_name=feed.key())
         entry.title = feed.title
         entry.excerpt = feed.excerpt
         entry.author_name = feed.author_name
         entry.date = feed.date
         entry.content = self.__Parse_image(feed.content)
         entry.categorie_keys = feed.categorie_keys
         entry.entrytype = Category().get(feed.categorie_keys[0]).media
         entry.save(True)
         feed.fetch_stat = 4
         feed.put()
     except Exception, data:
         logging.error('the db saved error is: %s', data)
         feed.fetch_stat = 3
         feed.put()
Exemplo n.º 5
0
 def get(self):
     if self.param('delid') == '':
         listit = FeedList()
         querys = listit.all()
         feedDetal = ''
     else:
         listit = FeedList()
         querys = listit.all().filter('name =',
                                      self.param('delid')).fetch(1)
         for query in querys:
             query.delete()
         self.redirect('/admin/feedblog/setup')
         self.response.set_status(301)
     self.template_vals.update({'list': querys})
     self.template_vals.update({'categories': Category.all()})
     content = template.render('plugins/feedblog/feedblog.html',
                               self.template_vals)
     self.render2('views/admin/setup_base.html', {
         'm_id': 'feedblog_setup',
         'content': content
     })
Exemplo n.º 6
0
	def post(self):
		query = FeedList()
		query.name = self.param('name')
		query.feedurl = self.param('feedurl')
		query.abconf = self.param('abconf')
		query.acategory = self.param('acategory')
		query.allow_target = self.param('allow_target')
		query.start_target = self.param('start_target')
		query.mid_target = self.param('mid_target')
		query.end_target = self.param('end_target')
		query.stop_target = self.param('stop_target')
		query.put()

		self.get()
Exemplo n.º 7
0
		def get(self):
				listit = FeedList()
				feeds = listit.all()
				listits = FeedsList()
				self.getFeed()
Exemplo n.º 8
0
    def post(self):
        query = FeedList()
        query.name = self.param('name')
        query.feedurl = self.param('feedurl')
        query.abconf = self.param('abconf')
        query.acategory = self.param('acategory')
        query.allow_target = self.param('allow_target')
        query.start_target = self.param('start_target')
        query.mid_target = self.param('mid_target')
        query.end_target = self.param('end_target')
        query.stop_target = self.param('stop_target')
        query.put()

        self.get()
Exemplo n.º 9
0
 def get(self):
     listit = FeedList()
     feeds = listit.all()
     listits = FeedsList()
     self.getFeed()