Use globals for the database connection
- remove the factory functions for creating engines and sessions - define global engine, connection, and session objects to be used everywhere in the urban_meal_delivery package
This commit is contained in:
parent
f996376b13
commit
2e3ccd14d5
8 changed files with 74 additions and 24 deletions
|
|
@ -3,8 +3,9 @@
|
|||
from urban_meal_delivery.db.addresses import Address
|
||||
from urban_meal_delivery.db.addresses_pixels import AddressPixelAssociation
|
||||
from urban_meal_delivery.db.cities import City
|
||||
from urban_meal_delivery.db.connection import make_engine
|
||||
from urban_meal_delivery.db.connection import make_session_factory
|
||||
from urban_meal_delivery.db.connection import connection
|
||||
from urban_meal_delivery.db.connection import engine
|
||||
from urban_meal_delivery.db.connection import session
|
||||
from urban_meal_delivery.db.couriers import Courier
|
||||
from urban_meal_delivery.db.customers import Customer
|
||||
from urban_meal_delivery.db.grids import Grid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue