Beispiel #1
0
	def get(self):
		""" show specified user's schedule
		    (not imprelemented yet)
			(now all user's schedule shown)
		""" 
		query = Schedule.all()
		query.order('month')
		query.order('day')
		schedule_list = query.fetch(limit=100)
		
		doRender(self, 'schedule_view.html', {'schedule_list':schedule_list})
Beispiel #2
0
	def _post_scheduled_tweet(self):
		today = self._to_Tokyo_timezone( datetime.now() )
		
		query = Schedule.all()
		query.filter( 'month =', today.month )
		query.filter( 'day =', today.day )
		
		test_list = []
		
		for sch in query:
			tweet = u'@' + sch.user + u' 今日は' + sch.todo
			test_list.append(tweet)
			TwitterApi.api.update_status(tweet)
			sch.delete()
			
		doRender(handler=self, values={'test_list':test_list})