webish: enable deletion of directories

This commit is contained in:
Brian Warner 2007-06-15 01:32:57 -07:00
parent 1eba30cd14
commit 51809ce341

View File

@ -167,7 +167,13 @@ class Directory(rend.Page):
ctx.fillSlots("type", "DIR")
ctx.fillSlots("size", "-")
ctx.fillSlots("uri", "-")
ctx.fillSlots("delete", "-")
del_url = url.here.child("_delete")
del_url = del_url.add("name", name)
delete = T.form(action=del_url, method="post")[
T.input(type='submit', value='del', name="del"),
]
ctx.fillSlots("delete", delete)
else:
raise RuntimeError("unknown thing %s" % (target,))
return ctx.tag