DEV Community

Adam Sung Min Park
Adam Sung Min Park

Posted on

09/03/22 Python GET request

Python, pymongo, Flask, mongoDB
So today i was trying to make a function which allows users to upload the pic and saving it.
Seemed quite simple since I already have done saving the post before.
However, when I tried to make a new @app.route(/) for the get request, for some reason the response was giving me back the HTML file I have filled in the argument field.

Still I am not sure how to solve this problem correctly, or efficiently but hey I have done it somehow.

I am thinking that this problem is caused since I already have one 'GET' request for the previous data load, so why not bring all the data at once and just pick and choose the data accordingly to the page?

Therefore I was able to solve the problem, not feeling great but still happy that it works.

TL;DR : 1. calling two 'GET' methods didnt seem to work

  1. My solution : load all the data at once under different keys and use them accordingly.

Cheers.

Top comments (0)