[Zope-dev] How-to : Defining custom DTML-tags ??
I want to create a custom DTML-tag. How/where do I start ? My goal is to create a way to define a form and validate the input ( that integers are valid, required fields filled out etc. ) using Javascript in the browser and and on the server side after posting. Any thoughts ? I was thinking something along the lines of : Python Perl C Any info on how to define your own custom dtml-tags *in python* would be highly appreciated. Anyhow, if the functionality I'm looking for is somehow allready available I'll consentrate on something else. Best regards, Thomas Weholt ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Project manager ala Sourceforge in Zope ??
Hi, I need something similar to Sourceforge ( project manager with docs, simple bug-reporting/issue-tracking, release-manager etc. ), implemented as a product in Zope. The zope.org-homepage has something similar. Is the code available? Does anybody know of any product like this? I'm just getting started with Zope but has several years background in Python. What would be the best way to develop a product like this from scratch ?? Any comments, ideas or people who want to participate in a project like this, please contact me. Best regards, Thomas Weholt ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Performance of Medusa ( Zope )
Hi, Can anybody point to a review/benchmark/performance report on Zope and/or Medusa, preferrably compared against Apache and MS IIS. Most interested in Medusa stripped of any Zope related packages, but I'll be happy for any info you can provide. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Indexing/Searching lots of XML-data
Hi, I got alot of XML-files I want to publish using Zope. What I need is to be able to upload them into specific folders, index them, let users search their contents and have the result displayed in some form, hopefully using XSLT and getting a nice browser-friendly output. Any clues? Best regards, Thomas Weholt ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Urgent code-review: code works on win2k, fails on Linux
I try to extend the ftp-server ( and http-server, but that works fine ) in Medusa/Zope to fit into a project I'm working on. The following script works fine under Windows2k, but it fails under Linux giving me a IOException when it tries to open the file I try to upload for writing. A ftp-client says the current working directory is "/" after login, which the user off course doesn't have write-access to, but I cannot seem to get the ftp-server to start in the right folder. I don't even know if that's the real problem ... What I need is a ftp-server that receives files of a specific type ( based on extension) in a specific folder built from FTP_FOLDER + username. That's it. No listing of files, no making of folders, removing etc. It's suppose to plug right into Zope or Medusa and so far everything works great, but only on Windows, and the final product must run on Linux. Sorry for posting something this big, but I'm desperate. Thanks. Best regards, Thomas Weholt - script begins - # Standard modules import sys, os, sha sys.path.insert(0, /usr/local/Zope/ZServer/medusa/') # Medusa modules import asyncore, http_server, ftp_server, filesys, resolver, logger # my/hs-modules import my_handler # Settings HTTP_PORT = 1900 FTP_PORT = 1921 IP_ADDRESS = 'localhost' INCOMING_ROOT = '/home/' LOG_FILE = 'log.txt' users = {'thomas':'5f50a84c1fa3bcff146405017f36aec1a10a9e38'} fs = filesys.os_filesystem ('.') lg = logger.file_logger (LOG_FILE) class my_ftp_channel(ftp_server.ftp_channel): """A custized ftp_channel for my ftp server""" def __init__(self, server, conn, addr): ftp_server.ftp_channel.__init__(self, server, conn, addr) self.answer = "000 You're not allowed to do that" def cmd_stor (self, line, mode='wb'): if len (line) < 2: self.command_not_understood (string.join (line)) else: if self.restart_position: restart_position = 0 self.respond ('553 restart on STOR not yet supported') return file = line[1] # todo: handle that type flag try: if not os.path.splitext(file)[1] in ['.jgz','jix']: self.respond("000 Cannot store that file") return except IndexError: self.respond("000 Wrong fileformat.") return try: fd = self.open (file, mode) except IOError, why: self.respond ('553 could not open file for writing: %s' % (repr(why))) return self.respond ( '150 Opening %s connection for %s' % ( self.type_map[self.current_mode], file ) ) self.make_recv_channel (fd) def log (self, message): self.server.logger.log ( self.addr[0], '%d %s' % (self.addr[1], message)) # Commands that are not allowed def cmd_help (self, line): self.respond("000 No help is available. This is an automated service.") return def cmd_appe (self, line): self.respond(self.answer) return def cmd_mkd (self, line): self.respond(self.answer) return def cmd_rmd (self, line): self.respond(self.answer) return def cmd_cwd (self, line): self.respond(self.answer) return def cmd_cdup (self, line): self.respond(self.answer) return def cdup (self, line): self.respond(self.answer) return class my_authorizer: def authorize (self, channel, username, password): pwd = sha.new(password) if users.has_key(username) and users[username] == pwd.hexdigest(): channel.read_only = 0 fs = filesys.os_filesystem (INCOMING_ROOT + username + os.sep) return 1, 'Login successful.', fs else: return 0, 'Login failed.', None def __repr__ (self): return '' fp = ftp_server.ftp_server (my_authorizer(), ip=IP_ADDRESS, port=FTP_PORT, logger_object=lg) fp.ftp_channel_class = my_ftp_channel dh = my_handler.default_handler(fs) hs = http_server.http_server (IP_ADDRESS, port=HTTP_PORT) hs.install_handler (dh) asyncore.loop() ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Writing my own request-handler
Hi, I want to write my own request in Zope. I want a specially formatted request or a command to be intercepted and processed by my own modules. If the user tries to access a url like http://www.myserver.org/myhandler or using a specific port on the server Zope traps this and my request_handler sends data back to the user based on the url . Why? I got a PostgreSQL database as a backend for a huge information organization project. I want to serve xml using a fast and stable solution like Zope or Medusa to do this, since I also need ftp for object-uploads, allthough these are not stored in ZODB. A normal ftp-server is used, and hopefully I could set up a normal medusa kind of ftp-server on a given port to do this, and avoid all the files being stuffed into the ZODB. I got a lot of non-Linux ( therefore as far as a know, non-postgresql-python users ) so I want to give them xml to process using a know protocol like HTTP. How can I write my own class/handler that traps this and serves my data ? I really want to use Zope cuz I use it for the rest of the site. I cannot serve all the postgresql data using plain zope-database methods cuz I want to write several clients in other programming languages that can receive and process the xml-format I use. The thing I want isn't xml-served as html, it's xml served to non-browser apps using HTML and ZOPE as means of delivery. Of course all of this is to be written in old-fashioned python, no Zope-products. Any hints, tips or guides is highly appreciated. I've looked at the Medusa source and found a couple of things that nearly does what I want them too, especially in the script_handler_demo-folder, but I'd like to get the whole thing into Zope if I could. Thanks. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Using Zope-modules in Python
Hi, I want to use some Zope-modules in plain Python, no web-stuff, namely ZODB and Persistence (maybe others too ). I've installed BeOpen Python 2.0 and Zope 2.2.2. I want to import the Zope-modules, but adding the C:\Program Files\WebSite\lib\python-folder to sys.path just doesn't cut it. I get an import error. Running on Windows 2000. Any tips, hints or guides wanted. Thanks! Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] How can Catalog index all parts/words of a attribute
Hi, I try to use Catalog with a object stored in ZODB3. I need to match single words in attributes in what might be a long string with several words in it. I've tried to set "self.cat.addIndex('name' ,'TextIndex' )" which is supposed to be full text searching at least said to be in the Zope-pages when creating a catalog in Zope. But when I try to search for objects they only return stuff if I enter the entire content of the attribute in question, not parts of it. This is not a Zope-product yet, but a foundation for a future product. I'm working on a full-text searching command-line interface, so nothing of this can be done thru Zopes web-interface at this point. the code has been posted earlier, in "Now; - problems using ZODB/ZCatalog in Python". Any quick hints? Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Now; - problems using ZODB/ZCatalog in Python
First off, sorry for posting a huge, stinkin' post like this, but instead of posting ten times trying to explain what I do, I post this once and hope somebody can point out what's wrong and I'll leave you all alone, at least for a while. The example is from the Catalog outside Zope-tutorial available at Zope.org. I'm using Zope 2.2.0. This might have been written for Zope 2.1.6. I dunno. I understand the error message, just don't why it is raised. If I should call some form of commit() or close(), where should this be done? And, by the way, does Catalog support different kinds of searches, like matching all the search-words, some, does the order count ? Can this options be set, if any exists? Anyway, thanks for your patience and bandwidth. Thomas import sys sys.path.append('d:\\progra~1\\website\\lib\\python\\') import ZODB import Persistence from Persistence import Persistent from ZODB.FileStorage import FileStorage from Products.ZCatalog.Catalog import Catalog ### create some classes to be persistent class Nobody( Persistent ): def identify( self ): print "I am Nobody!" class Person( Persistent ): def __init__( self, first, name, email, friend=Nobody() ): self.first = first self.name = name self.email = email self.friend= friend def identify( self ): print "I am " + self.first + " " + self.name print "and my Email is " + self.email ### OK, the ZODB-API together with a Catalog-Class class Application: def __init__( self, file='test.fs' ): self.file= file self.db = ZODB.DB( FileStorage( file ) ) self.co = self.db.open() self.root= self.co.root() if self.root.has_key( 'cat' ): self.cat= self.root['cat'] else: self.cat= Catalog() ### This is, how I get it to work self.cat.aq_parent= self.root self.root['cat']= self.cat ### Add indexes to the Catalog-Class ### The names must match the fields of the Person-Class! self.cat.addIndex('first','FieldIndex' ) self.cat.addIndex('name' ,'FieldIndex' ) self.cat.addIndex('email','FieldIndex' ) get_transaction().commit() def storePerson( self, person ): uid= id( person ) print "stored as " + str( uid ) self.root[uid]= person ### Let the Catalog know from this object self.cat.catalogObject( person, uid ) get_transaction().commit() def searchPerson( self, **kw ): r= self.cat.searchResults( kw ) paths= self.cat.paths root = self.root k= [] for i in r: id= i.data_record_id_ k.append( root[paths[id]] ) return k if __name__ == '__main__': a= Application() p1= Person( 'marian','kelc','[EMAIL PROTECTED]' ) p2= Person( 'tanja', 'kreierhoff','[EMAIL PROTECTED]', p1 ) p1.friend= p2 a.storePerson( p1 ) a.storePerson( p2 ) ### test2.py a= Application() ### perform searches with keyword-arguments ids= a.searchPerson( name='kelc' ) for i in ids: i.identify() print "Friend is:" i.friend.identify() i.friend.friend.identify() print str( id( i ) ) print str( id( i.friend.friend ) ) stored as 24111488 stored as 16520248 Traceback (innermost last): File "D:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py", line 307, in RunScript debugger.run(codeObject, __main__.__dict__, start_stepping=0) File "D:\Program Files\Python\Pythonwin\pywin\debugger\__init__.py", line 71, in run _GetCurrentDebugger().run(cmd, globals,locals, start_stepping) File "D:\Program Files\Python\Pythonwin\pywin\debugger\debugger.py", line 533, in run _doexec(cmd, globals, locals) File "D:\Program Files\Python\Pythonwin\pywin\debugger\debugger.py", line 868, in _doexec exec cmd in globals, locals File "D:\python\life\zodb_zcatalog.py", line 84, in ? a= Application() File "D:\python\life\zodb_zcatalog.py", line 28, in __init__ self.db = ZODB.DB( FileStorage( file ) ) File "D:\PROGRA~1\WebSite\lib\python\ZODB\FileStorage.py", line 262, in __init__ lock_file(f) File "D:\PROGRA~1\WebSite\lib\python\ZODB\lock_file.py", line 115, in lock_file raise error, ( StorageSystemError: Could not lock the database file. There must be another process that has opened the file. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Use ZODB3 and ZCatalog for indexing purposes
Hi, I'm wondering about using ZODB3 and ZCatalog for a CD-indexing project. The actual cd-roms will seldom change after they've been registered, and I'd like to have some sort of auto-full-text-search feature. How does ZODB3 and ZCatalog fit in this picture? I'm NOT making a Zope-product yet, just a plain python-script, using ZODB/ZCatalog for storage. Later, the thing will have a Zope-interface, but for now I'm having so much trouble with my current implementation using PostgreSQL, mostly due to the fact that I cannot get full-text-searching, that I really need some progress now. I'm dealing with plain python objects the entire time, but searching is alpha/omega in this case and will break it completly if not implemented correctly. Any hints, tips, flames or just emails sent out of boredome, I'm a lonely coder who needs a stinkin' break before I go completly nuts, so any feedback will be great. :-> Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Using Java-Script with DTML
Hi I`m trying to send a parameter to a java-script function and then use that parameter in the java-script function to look up a record-set in a database with a dtml-method. With no luck so far. Ex. alert (text); } ... The link sends an id to the java-script-method. A SQL method takes that id as argument and returns a recordset. Or, that`s what I want to happen. How can I get the sqlMethod to take the passed argument and return some data?? I get the thing to work by using static content, like But I need to pass the argument from somewhere else in the document. Oh, this was one big mess. Hope it makes some sense. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Comments on Zopes performance-article??
http://weblogs.userland.com/qube/2000/06/26 Just found this article were Zope scores really bad, - compared to the competition that is. Any comments? How can Zope improve performance in the future? I know Zope has alot of other good qualities, at least compared to Apache, but performance tends to be the thing that tips the scale when people chose platform, so how will this affect Zope? Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Temporary tables expire when ??
Hi, I`m using temporary tables, using PostgreSQL 7.0.2 and ZPygreSQL-DA v3.0, and in the RDBMS docs it says the temporary tables will be destroyed when the database-session is over. When does that happen using Zope? Doesn`t it hold the database connection open until it is manually closed? Can I override this, so that the temporary tables are destroyed after some time of inactivity or if the user logs off?? Thanks. Thomas Weholt
[Zope-dev] Full-text Indexing FOLLOW-UP
Hi ( again ) Wouldn`t Zope as a web-database integrator benefit from a feature like full-text searching? ( Everybody answers yes and nods. ) It seems as if Zope is aimed at information-publishing, using a RDBMS as source for that information. An initiative from the Zope community to either create products that support this using the most common RDBMS, support these features in database-adapters if the RDBMS supports it and/or create documentation ( HowTos/Tips ) on how to build a simple full-text searching, give ideas, overviews etc, would make Zope a more viable solution for information-publishing. My reason for asking this is that I`m trying to sell OpenSource to my co-workers, show that Open can be just as good as any commercial, Closed-Sourced alternative. When I said that full-text searching wasn`t running out-of-the-box I was laughed at. The solution used in my company is Windows 2000 server, MS SQL 7.0 and SiteServer/MS IIS. To compete with this full-text searching is a must. I used PostgreSQL 7.0.2 with Zope and PostgreSQL has a c-library for full-text searching included in the source. If we could get this to work with Zope we would be a bit closer. I`m going to dive into this, so if somebody wants to help, has tips or whatever, please feel free to email me. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Common Icons or Free Icon collection
Hi, I need some icons/pics for my Zope project. Are there any common icons for Zope I could use, and if not, shouldn`t there be such a thing? Does anybody know of any other collection of free icon-collections available ? Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Searching a relational database
Hi, How can I search a relational database thru Zope? ( I`m using PostgreSQL 7.0.2 on Linux ). I have a DVD/VHS-organizing project that would be pretty useless if people couldn`t search for movies by entering just parts of the title. Ex. typing alien should show "Alien" and "Alien 3". Can ZCatalog be used for this? If I have a SQL-statement that returns all rows in a database, can ZCatalog index this? What I`m looking for is similar to full-text searching on MS SQL 7.0 etc. Tips, hints or pointers?? Thomas
[Zope-dev] Error running on port 80, different IP than default
Hi, Just installed zope from source on a fresh Linux-box. Defined a zope-user and a zope-group to run Zope and everything works just fine if a run it with the default z2.py. I want to run it on a different ip, an alias to eth0, and on port 80. But when I change z2.py to reflect this I get an error running start in the Zope-folder. Traceback (innermost last): File "/usr/local/Zope/z2.py", line 493, in ? logger_object=lg) File "/usr/local/Zope/ZServer/medusa/http_server.py", line 552, in __init__ self.bind ((ip, port)) File "/usr/local/Zope/ZServer/medusa/asyncore.py", line 205, in bind return self.socket.bind (addr) socket.error: (13, 'Permission denied') I guess it`s cuz the zope user don`t have permission to bind to ip-interfaces and/or ports under 1024(?), but how do I fix this? I need to run it on a specified ip and port 80. This could be off-topic, a Linux problem, but I need serious help on this one. Thanks. Thomas Weholt ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] PostgreSQL 7.0.x support??
Hi, Got some problems getting my ZPyGreSQL-adapter working. I`ve installed PostgreSQL 7.0.2. Eh ... is there something I should know? Are there any PostgreSQL zope-products out there supporting 7.0.x, other than that based on PoPy, cuz that was one helluva pain to compile and get to work the last time I tried. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope vs. .... & missing features
Hi, Have anybody compared Zope to Roxen? Midgard? Or similar products? I saw Roxen had document revision system, a thing I "reported missing" earlier in this list. It also had full support for XML 1.0 and XSLT 1.0 or at least that`s what they claimed. These two features should be stuffed into Zope too somehow. Or should they ?? Any changes in these areas in the new 2.2 release of Zope? Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope`s global.asa
Hi, This might be a stupid question, but I`ll remain stupid at least until someone answers so ... Is there a global.asa counterpart in Zope, a place to put stuff that is or should be accessable in the entire site, like database-connections etc.? I was forced ( it was terrible, just terrible I tell ya!! ) to work in ASP on MS IIS ( it just gets worse ) and the global.asa didn`t seem like a bad idea. But as mentioned earlier, this might be in Zope allready. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] use ODBC to access other database
Hi, I have a Interbase-database I want to access from Zope, but cannot seem to find any Database-adapter-products etc. anywhere. Could I use a ODBC-adapter in Zope to connect to this database, or on some other manner connect to this database using SQL-methods in Zope-pages? Does anybody know if there are a Interbase-databaseadapter in development? Interbase is open-source, free etc. and allready an established product so it would be strange if it wasn`t supported by Zope, at least in the future. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] XML to SQL or XML into tables
Hello, Has anybody tried to somehow get xml-data into SQL-statements or in some other way use xml-data as datasource for insertion into tables? It shouldn`t be impossible, if we could just agree on some format or DTD to use. Ex. This means the demo database and the table users allready exists of course. Any thoughts? I know this could at least sort out alot of troubles I`m having right now getting data from external sources into Zope. I`m going to try and make a product or a method etc. that uses xmllib doing this, but if anybody has done it allready I`d be very happy do "abuse" their effort. :-> Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope + Gadfly = Rapid Prototyping?!
Hi, Now that I`ve a couple of SQL-methods working with Gadfly, I`m wondering if they will work without modification if I install a different SQL-database, like Postgres. Of course, that depends on SQL-syntax used and what part of SQL-standard the other database supports, but for rather simple SQL-stuff it should be ok, right? I hoped to create a prototype of my entire project just using Gadfly, with a very limited amount of data, then install a different database-adapter when it`s time to really shove alot of data into it. The queries might need optimization, but I`ll take those problems when they come. I just want to know if there are pitfalls to watch out for working like this? PS! Thanks for all the answers I got to my question about ZODB and ZCatalog, - it really enlightened me on some key issues in Zope I totally overlooked. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCatalog and Huge Customized Objects in ZODB
Is it possible to store lots of huge objects, like 2-3 MB in size each, in ZODB and catalog them for easy searching? Can I catalog special properties of custom objects and skip others? Are there any limitations to ZCatalog and the amount of stuff to index, before the speed is affected? If somebody has pointers on how to store custom python-objects in ZODB and make them ZCatalog-aware or somehow work with the ZCatalog, I`d be most grateful. Thanks. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZODB3 - updated stored objects
Hi, I read somewhere on www.zope.org that each time you update an object stored in ZODB3 a new record will be appended. Does this mean the entire object will be stored in a new location with the updated values? If so, isn`t that kinda dumb, at least if there`s no way to override this "feature"? Anyhow, I want to store several big custom objects in ZODB. These objects can be frequently updated, and I`d like to update the previously stored object, not store the entire thing again. Can anybody clarify or give me hints on how to do this? Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] What to return to a document and how to access it
Hi, These are defined in a product: #--- class SomeClass: """DocString""" def __init__(self): """DocString pass SomeDoc = HTMLFile('Some', globals()) # Some.dtml -> DTML-document def SomeMethod(self, values = '', REQUEST): # the values put into the method isn`t important now """Docstring""" a = SomeClass() a.values = {} a.values['1'] = [1,2,3,4,5] a.values['2'] = [323,3,4,41,25] a.plain_string = 'test' a.list = [32,435,21,9] return self.SomeDoc(self, a) #--- How can I access the returned object in 'Some.dtml'? I`ve tried stuff like: 1: ( I want the plain_string-property of the a-object ) 2: ( the same ) 3: ( the same ) 4. I get a NameError and KeyError etc. It works if I return a dictionary with keys pointing to single values, but I want to return a whole object, and do stuff like : #--- #--- What I want in HTML : test 1 1 2 3 4 5 2 323 3 4 41 25 32 435 21 9 If somebody could show me how to access the stuff returned in the method above, I`d be grateful. Thomas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )