Skip to content

connect to mongo container#113

Open
AChauvin78 wants to merge 3 commits intoiScsc:backend/pythonfrom
AChauvin78:pymongo
Open

connect to mongo container#113
AChauvin78 wants to merge 3 commits intoiScsc:backend/pythonfrom
AChauvin78:pymongo

Conversation

@AChauvin78
Copy link
Copy Markdown

@AChauvin78 AChauvin78 commented Jun 26, 2023

should close #111

Still opened questions:

Right now we chose to:

  • use pymongo because it's simpler, but soon we'll try to move to pymongoose because it seems to better handle schemes and data validation (even if this still have to be debated)
  • not use an app factory, but keep in mind that we should use one, and maybe move to a more classic flask app project organization (use a config.py maybe?)
  • the db object is in backenddatabase/__init__.py and because backend is the sys.path it can be accessed through import database, however the controllers still deal with collections adding which doesn't seem really clean...

Some tutos that might be useful:

@AChauvin78 AChauvin78 changed the base branch from main to backend/python June 26, 2023 12:36
@ctmbl ctmbl requested a review from dolphinau June 26, 2023 12:51
@ctmbl ctmbl added Priority: High The Issue must be addressed as soon as possible DB about the website database backend refactoring labels Jun 29, 2023
@ctmbl ctmbl linked an issue Jun 29, 2023 that may be closed by this pull request
dolphinau
dolphinau approved these changes Jul 3, 2023
Copy link
Copy Markdown
Contributor

@dolphinau dolphinau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have a prettier issue though, make sure to run make pretty to format the code!
🥤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend refactoring DB about the website database Priority: High The Issue must be addressed as soon as possible

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Connect backend to MongoDB and fill routes endpoints

3 participants