![]() |
.. (לתיקייה המכילה) | |
How should I configure my database connection (e.g. app.config['SQLALCHEMY_DATABASE_URI'])? | |
Just make it connect to your own DB - we will configure it on our own when testing. |
I'm having trouble using relationships in SQLAlchemy. Is that obligatory to use relationships? | |
No, it's not obligatory to use them. It should make your life easier but if you are having too much trouble you can use tables as relationships (like in the databases course). |
What we should do in the map section? | |
Your map should always present the markers of posts whose users you follow (including after searching for trips). The search should get a place and a radius as input (use Leaflet extensions for the places auto-complete), and return (and show on the map) all the trips (posts) within that radius of the place you inputted. |
How do I upload images? | |
You should use a form (as in the example), get the filename from the path, read the image and save it on the server-side. |
I'm having trouble with CORS, what should I do? | |
1. Make sure you used Flask-CORS to allow CORS on server-side. 2. Make sure you follow the json section here: https://flask-cors.readthedocs.io/en/1.9.0/ 3. Make sure you sent "crossDomain: true" when sending a request with axios. 4. If none of the above solves the problem, look here: https://medium.com/@eric_19798/cors-with-create-react-app-flask-and-minikube-1af319561c1 and add the headers manually. |