Code Monkey home page Code Monkey logo

Comments (5)

MikeTheCanuck avatar MikeTheCanuck commented on September 28, 2024

Based on my testing today with the "secrets" branch, I concluded that when we replaced sqlite3 with AWS-postgreSQL, the API must have been pulling data from postgres and not a local sqlite instance. I may be wrong, and looking at the existing code I don't know how that would work exactly, but I am puzzled by the fact that I wiped out the reference to sqlite3 in settings.py and I was still able to get a response from each endpoint and that the response included all the data I expected to see.

To be tested: what happens when I break the project_config.py (e.g. give it a bad database password).

from team-budget.

mxmoss avatar mxmoss commented on September 28, 2024

@MikeTheCanuck the version that you're testing with may still be pulling data from the CSV files

from team-budget.

jimtyhurst avatar jimtyhurst commented on September 28, 2024

The two endpoints OCRB and KPM are still getting data from the CSV files. However, the summary endpoint gets its data from the database. I just tested pull request #35 and confirmed that the endpoint can draw data from the AWS EC2 instance of PostgreSQL, rather than the sqlite3 that I used originally during development of that summary endpoint.

from team-budget.

jimtyhurst avatar jimtyhurst commented on September 28, 2024

I would leave this issue open until we have refactored the endpoints, so that OCRB and KPM get their data from the database, rather than reading from the CSV file. At that point, we can probably get rid of the summary endpoint, which is similar to OCRB, although it shows one way to do filtering and sorting, which goes beyond the current functionality of OCRB.

from team-budget.

jimtyhurst avatar jimtyhurst commented on September 28, 2024

Closed by the merge of pull request #59. All endpoints now read data from whichever database is specified in the project_config.py file. I tested with the AWS EC2 instance running PostgreSQL and also tested with the configuration set for the embedded sqlite3 database. They both worked. Not at the same time, of course. But you can change the project_config.py and restart the server to access a different database.

from team-budget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.