web/views/formrenderers.py
changeset 3477 8a9e26b93bb7
parent 3467 a6405235aac6
child 3478 f043f71017a3
--- a/web/views/formrenderers.py	Fri Sep 25 11:49:47 2009 +0200
+++ b/web/views/formrenderers.py	Fri Sep 25 11:50:22 2009 +0200
@@ -410,7 +410,12 @@
             super(EntityFormRenderer, self).render_buttons(w, form)
 
     def relations_form(self, w, form):
-        srels_by_cat = form.srelations_by_category('generic', 'add', strict=True)
+        try:
+            srels_by_cat = form.srelations_by_category('generic', 'add', strict=True)
+            warn('[3.6] %s: srelations_by_category is deprecated, override '
+                 'editable_relations instead' % classid(form), DeprecationWarning)
+        except AttributeError:
+            srels_by_cat = form.editable_relations()
         if not srels_by_cat:
             return u''
         req = self._cw