diff --git a/entities.py b/entities.py index 9e8728f32a58d95fbf940feef09e940072558e28_ZW50aXRpZXMucHk=..f2324563557174a2c38b29a5ab53a8a3f423ba7d_ZW50aXRpZXMucHk= 100644 --- a/entities.py +++ b/entities.py @@ -26,6 +26,12 @@ def dc_description(self, format='text/plain'): return self.printable_value('content', format=format) + def after_deletion_path(self): + """return (path, parameters) which should be used as redirect + information when this entity is being deleted + """ + return self.root().rest_path(), {} + # some views potentially needed on web *and* server side (for notification) # so put them here diff --git a/views.py b/views.py index 9e8728f32a58d95fbf940feef09e940072558e28_dmlld3MucHk=..f2324563557174a2c38b29a5ab53a8a3f423ba7d_dmlld3MucHk= 100644 --- a/views.py +++ b/views.py @@ -187,8 +187,8 @@ Button(stdmsgs.BUTTON_CANCEL, onclick=self.jsfunc % (jseid, ''))] form = self.vreg['forms'].select('edition', self.req, - entity=newcomment, form_buttons=buttons, - attrcategories=('primary',)) + entity=newcomment, + form_buttons=buttons) self.w(u'<div id="comment%sSlot">%s</div>' % ( commented.eid, form.form_render(main_form_title=u'', display_label=False, @@ -203,7 +203,7 @@ def call(self, commented): self.initialize_varmaker() - newcomment = self.vreg.etype_class('Comment')(self.req) + newcomment = self.vreg['etypes'].etype_class('Comment')(self.req) newcomment.eid = self.varmaker.next() self.comment_form(commented, newcomment)