Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

309
Views
Using a Flask endpoint in Vue component without fetch/axios

It's the weekend and I need to fill in some hours but I'm stuck on all my tasks. I can't figure out how the backend of the application I'm working on interacts with the front end. So far I have an endpoint that I can access that gives me the data:

@app.route('secure/endpointexample', methods=['GET'])
def get_data_from_backend():
   return jsonify(data_from_backend)

And I have a route that renders a template which is created using rollup Vue plugin.

@app.route('secure/renderexampletemplate', methods=['GET'])
def render_example_template():
   return render_template('example.html', data = get_data_from_Backend())

Finally, I'm trying to use the data in my Vue component like so:

<template>
  <div>
    <div v-for="datum in data" :key="datum.id">
      <p> datum.name </p>
    </div>
  </div>
</template>

I'm getting a message in the console to the effect that it's not finding the property (data).

I've tried using axios and javascript's fetch function but one requires installing a dependency and the other just doesn't work. I'm trying to use another application that my team built as an example and I've searched high and low for how they're accessing the api endpoints but nothing has come up.

Is there a way to access endpoints using pure flask or maybe another way that I'm not aware of?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!