# HG changeset patch # User Sylvain Thénault # Date 1255968924 -7200 # Node ID c3feb6a33f589abb776e81b4fd1c4542b2f75aee # Parent f9336257e0b9dd5b95e5fd026ffc2720a237c9c6 remove some warnings diff -r f9336257e0b9 -r c3feb6a33f58 web/views/cwproperties.py --- a/web/views/cwproperties.py Mon Oct 19 17:53:53 2009 +0200 +++ b/web/views/cwproperties.py Mon Oct 19 18:15:24 2009 +0200 @@ -79,7 +79,7 @@ return self._cw.build_url('view', vid=self.__regid__) def _cookie_name(self, somestr): - return str('%s_property_%s' % (self._cw.config.appid, somestr)) + return str('%s_property_%s' % (self._cw.vreg.config.appid, somestr)) def _group_status(self, group, default=u'hidden'): """return css class name 'hidden' (collapsed), or '' (open)""" diff -r f9336257e0b9 -r c3feb6a33f58 web/views/management.py --- a/web/views/management.py Mon Oct 19 17:53:53 2009 +0200 +++ b/web/views/management.py Mon Oct 19 18:15:24 2009 +0200 @@ -212,7 +212,7 @@ else: exclass = ex.__class__.__name__ ex = exc_message(ex, req.encoding) - if excinfo is not None and self._cw.config['print-traceback']: + if excinfo is not None and self._cw.vreg.config['print-traceback']: if exclass is None: w(u'
%s
' % xml_escape(ex).replace("\n","
")) @@ -226,19 +226,19 @@ # if excinfo is not None, it's probably not a bug if excinfo is None: return - vcconf = self._cw.config.vc_config() + vcconf = self._cw.vreg.config.vc_config() w(u"
") eversion = vcconf.get('cubicweb', self._cw._('no version information')) # NOTE: tuple wrapping needed since eversion is itself a tuple w(u"CubicWeb version: %s
\n" % (eversion,)) cversions = [] - for cube in self._cw.config.cubes(): + for cube in self._cw.vreg.config.cubes(): cubeversion = vcconf.get(cube, self._cw._('no version information')) w(u"Package %s version: %s
\n" % (cube, cubeversion)) cversions.append((cube, cubeversion)) w(u"
") # creates a bug submission link if submit-mail is set - if self._cw.config['submit-mail']: + if self._cw.vreg.config['submit-mail']: form = self._cw.vreg['forms'].select('base', self._cw, rset=None, mainform=False) binfo = text_error_description(ex, excinfo, req, eversion, cversions) @@ -281,7 +281,7 @@ def call(self, **kwargs): """display server information""" - vcconf = self._cw.config.vc_config() + vcconf = self._cw.vreg.config.vc_config() req = self._cw _ = req._ # display main information @@ -289,12 +289,12 @@ self.w(u'') self.w(u'' % ( 'CubicWeb', vcconf.get('cubicweb', _('no version information')))) - for pkg in self._cw.config.cubes(): + for pkg in self._cw.vreg.config.cubes(): pkgversion = vcconf.get(pkg, _('no version information')) self.w(u'' % ( pkg, pkgversion)) self.w(u'' % ( - _('home'), self._cw.config.apphome)) + _('home'), self._cw.vreg.config.apphome)) self.w(u'' % ( _('base url'), req.base_url())) self.w(u'' % ( diff -r f9336257e0b9 -r c3feb6a33f58 web/views/owl.py --- a/web/views/owl.py Mon Oct 19 17:53:53 2009 +0200 +++ b/web/views/owl.py Mon Oct 19 18:15:24 2009 +0200 @@ -66,7 +66,7 @@ def call(self, writeprefix=True): skipmeta = int(self._cw.form.get('skipmeta', True)) if writeprefix: - self.w(OWL_OPENING_ROOT % {'appid': self._cw.schema.name}) + self.w(OWL_OPENING_ROOT % {'appid': self._cw.vreg.schema.name}) self.visit_schema(skiptypes=skipmeta and schema.SKIP_TYPES or ()) if writeprefix: self.w(OWL_CLOSING_ROOT) @@ -79,7 +79,7 @@ def visit_schema(self, skiptypes): """get a layout for a whole schema""" self.skiptypes = skiptypes - entities = sorted(eschema for eschema in self._cw.schema.entities() + entities = sorted(eschema for eschema in self._cw.vreg.schema.entities() if not eschema.final or eschema in skiptypes) self.w(u'') for eschema in entities: @@ -151,7 +151,7 @@ content_type = 'application/xml' # 'text/xml' def call(self): - self.w(OWL_OPENING_ROOT % {'appid': self._cw.schema.name}) + self.w(OWL_OPENING_ROOT % {'appid': self._cw.vreg.schema.name}) for i in xrange(self.cw_rset.rowcount): self.cell_call(i, 0) self.w(OWL_CLOSING_ROOT) diff -r f9336257e0b9 -r c3feb6a33f58 web/views/tabs.py --- a/web/views/tabs.py Mon Oct 19 17:53:53 2009 +0200 +++ b/web/views/tabs.py Mon Oct 19 18:15:24 2009 +0200 @@ -92,7 +92,7 @@ tabkwargs = tabkwargs.copy() except ValueError: tabid, tabkwargs = tab, {} - tabkwargs.setdefault('rset', self.rset) + tabkwargs.setdefault('rset', self.cw_rset) vid = tabkwargs.get('vid', tabid) try: viewsvreg.select(vid, self._cw, **tabkwargs) @@ -136,7 +136,7 @@ w(u'
' % tabid) tabkwargs.setdefault('tabid', tabid) tabkwargs.setdefault('vid', tabid) - tabkwargs.setdefault('rset', self.rset) + tabkwargs.setdefault('rset', self.cw_rset) self.lazyview(**tabkwargs) w(u'
') # call the set_tab() JS function *after* each tab is generated diff -r f9336257e0b9 -r c3feb6a33f58 web/views/wdoc.py --- a/web/views/wdoc.py Mon Oct 19 17:53:53 2009 +0200 +++ b/web/views/wdoc.py Mon Oct 19 18:15:24 2009 +0200 @@ -91,15 +91,16 @@ def call(self): fid = self._cw.form['fid'] - for lang in chain((self._cw.lang, self._cw.vreg.property_value('ui.language')), - self._cw.config.available_languages()): + vreg = self._cw.vreg + for lang in chain((self._cw.lang, vreg.property_value('ui.language')), + vreg.config.available_languages()): rid = '%s_%s.rst' % (fid, lang) - resourcedir = self._cw.config.locate_doc_file(rid) + resourcedir = vreg.config.locate_doc_file(rid) if resourcedir: break else: raise NotFound - self.tocindex = build_toc(self._cw.config) + self.tocindex = build_toc(vreg.config) try: node = self.tocindex[fid] except KeyError:
%s%s
%s%s
%s%s
%s%s
%s%s