Esempio n. 1
0
def makeTweets(foodsToTweet):
	foodTweets = TweetOptions.objects.get(category='food')
	i = 0
	for thing in foodsToTweet:
		t = Tweets(tweet = toTweet('food', foodTweets[i], thing))
		t.save()
		i += 1
		if (i == foodTweets.length-1):
			i=0
Esempio n. 2
0
def makeTweets(foodsToTweet):
	foodTweets = TweetOptions.objects.filter(category='food')
	i = 0
	for thing in foodsToTweet:
		twee = toTweet('food', foodTweets[i].tweet, thing)
		t = Tweets(tweet=twee)
		t.save()
		thing.last_tweeted = timezone.now()
		thing.save()
		i += 1
		if (i >= foodTweets.count()-1):
			i=0
Esempio n. 3
0
def driveTweet(freq_before, freq_during):	
	driveTweets = TweetOptions.objects.filter(category='drive')
	i = 0
	for thing in Drives.objects.all():
		if checkValidDrive(thing, freq_before, freq_during):
			twee = toTweet('drive', driveTweets[i].tweet, thing)
			t = Tweets(tweet = twee)
			t.save()
			thing.last_tweeted = timezone.now()
			thing.save()
			i += 1
			if (i == driveTweets.count()-1):
				i=0
Esempio n. 4
0
def driveTweet(freq):
	
	drive_freq = freq
	driveTweets = TweetOptions.objects.get(category='drive')

	i = 0
	for thing in Drives.objects.all():
		if checkValid(thing, drive_freq):
			t = Tweets(tweet = toTweet('drive', driveTweets[i], thing))
			t.save()
			i += 1
			if (i == driveTweets.length-1):
				i=0