Created
December 15, 2018 19:39
-
-
Save parzibyte/54e208294b686f7399c0c9a6f56c4d1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def insertar(producto): | |
base_de_datos = obtener_bd() | |
productos = base_de_datos.productos | |
return productos.insert_one({ | |
"nombre": producto.nombre, | |
"precio": producto.precio, | |
"cantidad": producto.cantidad, | |
}).inserted_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment