I’m taking the first baby steps in what I’m hoping will become a complete one way connector from ERPNext to MYOB.
I only program in my spare time, so my knowledge is a bit fragmented. But I understand working with APIs and I’ve wrapped my head around Oauth2. I’ve been learning some Flask and I’ve run Postman samples and I’m kind of figuring out the structure.
Here’s where I’m getting stuck conceptually, and I’m sure this is my lack of understanding of the Frappe framework, but I’m stuck with the first Oauth2 step which is redirecting the user to a url that returns the access code.
What confuses me is how I would approach this in Frappe. Do I use JavaScript to do the redirect, or Python? Like am I supposed to do the redirect in JavaScript and then send the url result to Python using AJAX and then do everything else in Python? Or can I use frappe.local.response[redirect] in Python and not even use JavaScript at all?
Now I have no trouble doing this step in a python interpreter, and when I look at Flask I think, if I was using Flask, I would do the whole thing in Flask and not even touch JavaScript.
I guess it’s Frappe that I’m struggling to understand and how Python and JavaScript work together in the framework.