Initial clean commit
This commit is contained in:
commit
6784d81c2c
141 changed files with 25219 additions and 0 deletions
9
models/categorias.py
Normal file
9
models/categorias.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from psycopg2 import extras
|
||||
from typing import List, Dict
|
||||
|
||||
|
||||
def get_categorias(conn) -> List[Dict]:
|
||||
with conn.cursor(cursor_factory=extras.DictCursor) as cur:
|
||||
cur.execute("SELECT id, nombre FROM categorias ORDER BY nombre;")
|
||||
return cur.fetchall()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue