Commit 14d98905 authored by Gabriel Detraz's avatar Gabriel Detraz

Ajoute une fonction lieux publics

parent fab23336
......@@ -89,6 +89,13 @@ def chbre_commentaire(batiment, chambre):
except TypeError:
raise ValueError("Chambre inexistante bat %r, chbre %r" % (batiment, chambre))
@_need_conn
def lieux_public():
cur = conn.cursor()
cur.execute("SELECT batiment,chambre FROM prises_prise WHERE public=True")
results = cur.fetchall()
return [batiment+chambre for batiment, chambre in results]
@_need_conn
def reverse(batiment, prise = None):
"""Correspondance prise -> chambre"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment