示例#1
0
def get_bookmarks(request):
	# db = query(request, "db")
	output = "[]"
	if users.is_logged_in(request):
		output = bookmark.get_bookmarks(users.get_logged_email(request))

	return HttpResponse(output)
示例#2
0
def del_bookmark(request):
	# db = query(request, "db")
	output = "Authentication required"
	if users.is_logged_in(request):
		# email = users.get_logged_email(request, db)
		# query(request, "db"),
		output = bookmark.del_bookmark(query(request, "id"))

	return HttpResponse(output)
示例#3
0
def set_bookmark(request):
	# db = query(request, "db")
	output = "Authentication required"
	if users.is_logged_in(request):
		email = users.get_logged_email(request)
		output = bookmark.set_bookmark(query(request, "bookmark_id"), email,
		                               query(request, "pageSerial"), query(request, "title"), query(request, "query"))

	return HttpResponse(output)