app/soc/views/models/base.py
changeset 1594 b80bf089d5f7
parent 1500 a495ae7efc70
child 1658 65147d9fbd96
--- a/app/soc/views/models/base.py	Mon Mar 02 19:48:20 2009 +0000
+++ b/app/soc/views/models/base.py	Mon Mar 02 20:32:59 2009 +0000
@@ -555,9 +555,14 @@
           error, request, template=params['error_edit'])
 
     if not self._logic.isDeletable(entity):
-      # TODO: Update the notice area telling the user that they
-      # can't delete the entity
-      pass
+      page_params = params['cannot_delete_params']
+      params['suffix'] = entity.key().name()
+      request.path = params['edit_redirect'] % params
+
+      # redirect to the edit page
+      # display notice that entity could not be deleted
+      return helper.responses.redirectToChangedSuffix(
+          request, None, params=page_params)
 
     self._logic.delete(entity)
     redirect = params['delete_redirect']