# HG changeset patch # User Sylvain Thénault # Date 1301331778 -7200 # Node ID e9c92bb7978756cb6004e32aee2260b6be076faa # Parent 5893b899c21f4f8ce493037b8f6e7f76a7b1889c cleanup diff -r 5893b899c21f -r e9c92bb79787 server/edition.py --- a/server/edition.py Mon Mar 28 19:02:47 2011 +0200 +++ b/server/edition.py Mon Mar 28 19:02:58 2011 +0200 @@ -1,4 +1,29 @@ +# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . +"""helper classes to handle server-side edition of entities""" + +from __future__ import with_statement + +__docformat__ = "restructuredtext en" + from copy import copy +from yams import ValidationError + _MARKER = object() @@ -109,7 +134,6 @@ else: relations = [entity._cw.vreg.schema.rschema(rtype) for rtype in self] - from yams import ValidationError try: entity.e_schema.check(dict_protocol_catcher(entity), creation=creation, _=entity._cw._, @@ -124,5 +148,3 @@ thecopy.entity._cw_related_cache = {} thecopy.update(self, skipsec=False) return thecopy - - diff -r 5893b899c21f -r e9c92bb79787 web/webctl.py --- a/web/webctl.py Mon Mar 28 19:02:47 2011 +0200 +++ b/web/webctl.py Mon Mar 28 19:02:58 2011 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -17,12 +17,13 @@ # with CubicWeb. If not, see . """cubicweb-ctl commands and command handlers common to twisted/modpython web configuration +""" -""" __docformat__ = "restructuredtext en" +from logilab.common.shellutils import ASK + from cubicweb.toolsutils import CommandHandler, underline_title -from logilab.common.shellutils import ASK class WebCreateHandler(CommandHandler): cmdname = 'create'