Separate Company Website

Good Day

I use the following to retrieve news letters from ERPNext:

from frappeclient import FrappeClient

print “logging in…”
client = FrappeClient(“http://myurl.co.za”, “user”, “password”)

news_subject = client.get_value(“Newsletter”,“subject”,{“idx”: “0”})
news_message = client.get_value(“Newsletter”,“message”,{“idx”: “0”})

print news_subject
print news_message

2 questions:

  • How to get count (Quantity) of newsletters from client to make a loop?
  • If I want to use this as a website backend how can i get info to frontent that is HTML & Javascript?

Hope anyone can help.

Thank You

Albertus Geyser