web/views/forms.py
changeset 4183 b5aa030bb2f9
parent 4181 c79135c217df
child 4224 5998df006968
--- a/web/views/forms.py	Tue Dec 22 13:13:53 2009 +0100
+++ b/web/views/forms.py	Tue Dec 22 13:14:34 2009 +0100
@@ -227,9 +227,9 @@
             return self.force_session_key
         # XXX if this is a json request, suppose we should redirect to the
         # entity primary view
-        if self.req.json_request and self.edited_entity.has_eid():
+        if self._cw.json_request and self.edited_entity.has_eid():
             return '%s#%s' % (self.edited_entity.absolute_url(), self.domid)
-        return '%s#%s' % (self.req.url(), self.domid)
+        return '%s#%s' % (self._cw.url(), self.domid)
 
     def build_context(self, formvalues=None):
         super(EntityFieldsForm, self).build_context(formvalues)