1

I am using a custom database (MongoDB) with TG 2.1 and i am wondering where the proper place to store the PyMongo connection/database instances would be?

Eg, at the moment they are getting created inside of my inherited instance of AppConfig. Is there a standard location to store this? Would shoving the variables into the project.model.__init__ be the best location, given that under SQLAlchemy, the database seems to commonly be retrieved via:

from project.model import DBSession, metadata

Anyway, just curious what the best practice is.

Lee Olayvar
  • 3,150
  • 5
  • 26
  • 33

1 Answers1

0

As of TurboGears 2.1.3, MongoDB support is integrated via the Ming ORM. I would look at a quickstarted project using the --ming option to get best practices if you want to do some customization: http://turbogears.org/2.1/docs/main/Ming.html

Rick Copeland
  • 10,912
  • 4
  • 37
  • 38