# HG changeset patch # User Sylvain Thénault # Date 1251730133 -7200 # Node ID a8e901fc44579d1da9490a4c0456a0ba46291a52 # Parent 1be8bf42bc5d88d21cce0f2f1318c99aa57e078b ease overriding of copy warning diff -r 1be8bf42bc5d -r a8e901fc4457 web/views/editforms.py --- a/web/views/editforms.py Mon Aug 31 16:48:14 2009 +0200 +++ b/web/views/editforms.py Mon Aug 31 16:48:53 2009 +0200 @@ -371,6 +371,8 @@ entity """ id = 'copy' + warning_message = _('Please note that this is only a shallow copy') + def render_form(self, entity): """fetch and render the form""" # make a copy of entity to avoid altering the entity in the @@ -381,7 +383,7 @@ self.initialize_varmaker() self.newentity.eid = self.varmaker.next() self.w(u'\n' - % self.req._('Please note that this is only a shallow copy')) + % self.req._(self.warning_message)) super(CopyFormView, self).render_form(self.newentity) del self.newentity