[Zope] select age(birthday) from web_users
Hi, Query in the topic from postgresql database returns from psql line, years, months and days. From testing same query in zope i get only days, is there a way to force it to return as psql does return it? As in: brain_dev=# select age(birthday) from web_users; age 13 years 8 mons 8 days (записей: 6) brain_dev=# thanks Pavel ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] variable propagation
Hi, I would like to ask how to propagate variables from initial index_html call to deeper levels. Say I have index_html python script, I invoke it then I would like to feed some data to generic template, that will in turn will invoke template in the same directory that will do nice layout of my results. Generic template lies below all other objects, in directory tree, in the root. When I execute the command chain, variables are not passed and options is lost on one layer of zpt calls. Is there way to rectify that. Thanks Pavel ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] variable propagation
В Пнд, 24/07/2006 в 15:00 -0700, David H пишет Pavel, You question is a bit vague but ... Make your index_html a python script. And then stuff your REQUEST with info you want Then just call the Page Template ... request.set('formvar1', somevalue) return context.myPageTemplate(context.request) Of course of you have forms submit with an action=. and method=post. Then you can intercept all calls using index_html, do what you need to do and *then* render the next form. here is description: root/ index_html index_tmpl -- invokes here.content_html root/some/web/page index_html -- overriding root one, calls -- context.index_tmpl(some parameters=some parameters). content_html -- gets called from index_tmpl So i want parameters that are presented to index_html be presented to context_html just like they would be presented to index_html. So i would be able to call context_html from outside as well from the inside. Ie span tal:replace=username/ should work in both cases. I thought thats the way zope's code reuse works. Thanks Pavel ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-dev] opinion: speeding up large PUT uploads
Hello, If you look above I had problems with zope creating temp files, as I am using Mac OS X and Webdav to Zope mounted on the same machine. There is some race condition on locks in mach kernel, and sometimes zope dies, as open system call never returns. I had two choices, one to fix Darwin kernel, and one to make TempFile use StringIO, which worked wonderfully. You can override make_file of FieldStorage to return StringIO(), or cStringIO(). Now there are no problems with locked out files, for me. laters, pavel ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] OS X 10.3.8 + mount_webdav + Zope all on powerbook
Florent Guillaume wrote: But why oh why are you useing mount_webdav for Zope's files ? In the best case it would still slow down things immensely. Because I am using vim, which in comparison to cadaver, can be configured to recognize extensions in from of *_html *_py and *_sql. Because I can use grep and find and other unix tools to locate stuff that i need. Because I am a power unix user and cadaver strips away everything I know about file manipulation. regards, pavel ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] editing zope files
I try to edit zope file in zope istalled directory, HTTPServer in particular, i want to debug some things, but I get syntax errors on any code i try insert like a=1 , or 'print'. like: # /opt/web/bin/runzope /opt/zope_core/lib/python/Zope/Startup neo[5135] Traceback (most recent call last): File /opt/zope_core/lib/python/Zope/Startup/run.py, line 50, in ? run() File /opt/zope_core/lib/python/Zope/Startup/run.py, line 18, in run opts = _setconfig() File /opt/zope_core/lib/python/Zope/Startup/run.py, line 42, in _setconfig opts.realize(doc=Sorry, no option docs yet.) File /opt/zope_core/lib/python/zdaemon/zdoptions.py, line 271, in realize self.load_schema() File /opt/zope_core/lib/python/zdaemon/zdoptions.py, line 312, in load_schema self.schema = ZConfig.loadSchema(self.schemafile) File /opt/zope_core/lib/python/ZConfig/loader.py, line 37, in loadSchema return SchemaLoader().loadURL(url) File /opt/zope_core/lib/python/ZConfig/loader.py, line 71, in loadURL return self.loadResource(r) File /opt/zope_core/lib/python/ZConfig/loader.py, line 137, in loadResource schema = ZConfig.schema.parseResource(resource, self) File /opt/zope_core/lib/python/ZConfig/schema.py, line 43, in parseResource xml.sax.parse(resource.file, parser) File /usr/lib/python2.3/site-packages/_xmlplus/sax/__init__.py, line 31, in parse parser.parse(filename_or_stream) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 109, in parse xmlreader.IncrementalParser.parse(self, source) File /usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py, line 123, in parse self.feed(buffer) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 216, in feed self._parser.Parse(data, isFinal) File /usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py, line 312, in start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File /opt/zope_core/lib/python/ZConfig/schema.py, line 119, in startElement getattr(self, start_ + name)(attrs) File /opt/zope_core/lib/python/ZConfig/schema.py, line 306, in start_import src = self._loader.schemaComponentSource(pkg, file) File /opt/zope_core/lib/python/ZConfig/loader.py, line 154, in schemaComponentSource __import__(package) File /opt/zope_core/lib/python/ZServer/__init__.py, line 36, in ? from HTTPServer import zhttp_server, zhttp_handler File /opt/zope_core/lib/python/ZServer/HTTPServer.py, line 79 print ^ How can I rectify this? pavel ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
FIXED: Re: [Zope-dev] editing zope files
Was a spacing issue thanks to #zope on freenode, pavel ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] WebDAV BUGS and access to /tmp directory
Florent Guillaume wrote: Pavel Zaitsev [EMAIL PROTECTED] wrote: I am back trying to figure out why my zope crashes on Please define crashes. Well zope is trying to create file in /tmp , process gets 'state' - 'U' which is not defined in the manual, maybe Unresponsive, like 'D' sign? then after while whole system locks up, it gets killed by overlooking parent, after which things sort of go back to normal.(pid of process gotten by 'ps aux|grep zope' changes.) gdb does not seem to be able to dump a backtrace of the process either, it says that process has quit while evaluating injected statement i have no idea what is going on. pavel. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-dev] zope /tmp file usage
Hi, I am wondering what code in Zope 2.7.5-final potentially may use /tmp directory for temprorary files. I am using zope over webdav and sometimes webdav tries to create a tmp file, of some sort and some parts of the system lock up. There are xml parsers,mime decoders all of which do have binary code bits, so I asking for expert advice, if someone knows of what circuimstances zope would use /tmp directory to create a file... your help will be greatly appreciated. Pavel ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Mac OS X and zope (continued)
Oops looks like i have made mistake to use select instead of thread command... post more log stuff later. pavel ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )