Esempio n. 1
0
def addfavorites(request, msgid):
	'''
	Adding to and accessing favorites list
	'''
	msg = FavoriteRenderer.addToFavorites(request.user.email, msgid)
	messages.info(request, msg)
	mslist = FavoriteRenderer.getFavorites(request.user.email)
	return HttpResponseRedirect('/home')
Esempio n. 2
0
def removefavorites(request, msgid):
	'''
	Removing from favorites list
	'''
	msg = FavoriteRenderer.removeFromFavorites(request.user.email, msgid)
	messages.info(request, msg)
	mslist = FavoriteRenderer.getFavorites(request.user.email)
	#return HttpResponseRedirect('/home')
	return render_to_response('favorites.html', {'mslist': mslist}, context_instance=RequestContext(request))
Esempio n. 3
0
def favorites(request):
	'''
	Accessing favorites list
	'''
	mslist = FavoriteRenderer.getFavorites(request.user.email)
	return render_to_response('favorites.html', {'mslist': mslist}, context_instance=RequestContext(request))