make sure all web views also have a post method

workspace
Brendan Howell 4 years ago
parent cb0510db80
commit abe84ffb2b

@ -100,7 +100,11 @@ class Audio(Bureau):
<body>
<h1>Audio Department</h1>
<h2>Radio Stations<h2>
<ul>
"""
with self.urldb.env.begin(db=self.urldb.db) as txn:
for sh_code, url in txn.cursor():
ret += "<li>" + url + "</li>\n"
if data:
if data["addurl"]:
self.save_url(data["addurl"])

@ -105,6 +105,7 @@ class IhrApp(Bottle):
def wrapped_cb():
return callback(request.forms)
self.route("/" + prefix + "/" + view, callback=wrapped_cb)
self.route("/" + prefix + "/" + view, callback=wrapped_cb, method="POST")
def register_crud(self, data):
# adds callbacks for crud operations on a database

Loading…
Cancel
Save