def edit(self, name=None, **kwargs):
"""Remove a tag from a single recipe."""
name,recipe,action = self._normalize_edit_params(name, **kwargs)
- if action.startswith('edit'):
+ if action == 'remove':
+ recipe = self.cookbook.index[name]
+ os.remove(recipe.path)
+ self.cookbook.remove(recipe)
+ self.cookbook.make_index()
+ raise cherrypy.HTTPRedirect(u'.', status=302)
+ elif action.startswith('edit'):
self._update_recipe(name, recipe)
if action == 'edit and redirect': # done editing this recipe
raise cherrypy.HTTPRedirect(