app/soc/views/models/base.py
changeset 2161 3b5e0e0880cd
parent 2160 3f9dd37d98a8
child 2164 94e498e3dd44
--- a/app/soc/views/models/base.py	Sat Apr 11 22:58:19 2009 +0000
+++ b/app/soc/views/models/base.py	Sat Apr 11 22:58:57 2009 +0000
@@ -376,7 +376,7 @@
         edit_form, only it is used when there is no existing entity.
       edit_redirect: The edit_redirect value is used as the first part
         of the url if the form was valid. The last part of the url is
-        created using the getKeySuffix method of the _logic object.
+        created using the .key().id_or_name() method of the entity.
       edit_params: The edit_params dictionary is used as argument to
         redirectToChangedSuffix, it will be appended to the url in the
         standard ?key=value format.
@@ -411,7 +411,7 @@
       return http.HttpResponseRedirect('/')
 
     page_params = params['edit_params']
-    params['suffix'] = logic.getKeySuffix(entity)
+    params['suffix'] = entity.key().id_or_name()
 
     request.path = params['edit_redirect'] % params
 
@@ -453,7 +453,7 @@
     """
 
     logic = params['logic']
-    suffix = logic.getKeySuffix(entity)
+    suffix = entity.key().id_or_name()
 
     # remove the params from the request, this is relevant only if
     # someone bookmarked a POST page.
@@ -891,7 +891,7 @@
     """
 
     logic = params['logic']
-    suffix = logic.getKeySuffix(entity)
+    suffix = entity.key().id_or_name()
 
     context['form'] = form
     context['entity'] = entity