class WebsiteSignage(http.Controller):
# DELETE POST
# /[project]/admin/post/{menuId.id}/{post.id}/delete
@http.route(['/signage/admin/post/<model("signage.signage"):signage>/<model("signage.area.page"):page>/delete'],type='http', auth='user', website=True)
def delete_postId (self, signage, page):
page.unlink()
return werkzeug.utils.redirect('/signage/admin/menu/%s/edit' % signage.id)
# DELETE AREA
# /[project]/admin/submenu/{submenu.id}/delete
@http.route(['/signage/admin/submenu/<model("signage.area"):area>/delete'],type='http', auth='user', website=True)
def delete_postId (self, area):
area.unlink()
return werkzeug.utils.redirect('/signage/' )
# DELETE [PROJECT] // SHOWCASE
# /[project]/admin/menu/{menu.id}/delete
@http.route(['/signage/admin/menu/<model("signage"):signage>/delete'],type='http', auth='user', website=True)
def delete_postId (self, signage):
_logger.warn('<<<<<<<<<<<<<<<<< signage = %s' % signage)
signage.unlink()
return werkzeug.utils.redirect('/signage/' )
Why is the third "unlink" not working? The first and second "unlink" is working!