[ ] how to access to the db object from controllers package
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...
should close #111
Still opened questions:
Right now we chose to:
pymongo
because it's simpler, but soon we'll try to move topymongoose
because it seems to better handle schemes and data validation (even if this still have to be debated)config.py
maybe?)backenddatabase/__init__.py
and becausebackend
is thesys.path
it can be accessed throughimport database
, however the controllers still deal with collections adding which doesn't seem really clean...Some tutos that might be useful: