Re: [Zope-dev] Fw: 2gb file size
Shane Hathaway wrote: Are you running Zope 2.2.1 or later? There were pointer arithmetic errors that occurred on earlier versions, even with operating systems that support 2 GB files. So on W2K, Zope can have 2GB databases? I'd really like to hear if you get it to work Andy (or if anyone else did.) -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ 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] ZClasses not copyable - why?
It is not posible to copy ZClasses, when I try to copy a ZClass in the Management Interface I get the error:'The Item 'blorf' does not support that operation' I digged into that and found that in the ZClass.py there exists a method def cb_isCopyable: pass I was so crude to replace the pass with a 'return 1', restarted Zope and could now copy ZClasses as I wanted it. - My first question now: 0.Why are ZClasses not copyable? 1.Do I shoot into my foot with my hack or is that OK? - And now my second question I am working on a ZClass-intensive project and sometimes I want to add/remove base classes of a ZClass without redefining the whole class manually. in ZClass I have found a nice-sounding method _setBasesHoldOnToYourButts() grin, and the source is commented with '#Eeeek', h What are the risks for a good shot into my foot using this function? thanks phil ___ 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 )
Re: [Zope-dev] ZClasses not copyable - why?
Philipp Auersperg wrote: in ZClass I have found a nice-sounding method _setBasesHoldOnToYourButts() grin, and the source is commented with '#Eeeek', h What are the risks for a good shot into my foot using this function? If your new base classes requires some variables to be initialized in __init__, older instances may not work since they won't have them, and other similar problems. I've done this before, when I really had to - usually nothing bad happens. -- Itamar S.T. [EMAIL PROTECTED] Fingerprint = D365 7BE8 B81E 2B18 6534 025E D0E7 92DB E441 411C ___ 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 )
Re: [Zope-dev] ZCLass help
Veiko Schnabel writes: i created a new Product calles book with propertys writer(string), pages(int) and a standart method called index_html to output all these probertys instance "my_book" dtml-var my_book all i get is the id of the instance my_book PubClass instance at 8ab30c8 The ZPublisher (i.e. when you access your instance with the internet) automatically activates "index_html" (if the object is not callable). "dtml-var" does not. Instead, it calls the object, if it is callable (not the case in your example), and then converts to a string. You can use: dtml-with my_book dtml-var index_html /dtml-with Dieter ___ 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 )
Re: [Zope-dev] another debugging howto, and a question
Simon Michael writes: Here are some draft howto-like things some might find helpful (improvements welcome) : http://zwiki.org/ZopeDebuggingRoadmap http://zwiki.org/HowToDebugZopeInEmacs and a burning question: how can I invoke zserver such that I will get the interactive debug prompt ? I'd like to have my breakpoints trigger when I access the server in the normal way with a web browser, poke around, let it run on and do it again. I was able to do this in the past and it's useful. Maybe, the monitor is what you need. In a monitor session, you can import pdb. However, as Zope is multi-threaded, pdb interaction might seriously affect the other threads. To put it another way: I am not sure, whether pdb is thread safe. Dieter ___ 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] LoginManager Acquisition Problem
Greetings Fellow ZoPeople, I'm having some difficulty with Acquisition of security settings within LoginManager protected folders. I'm using the latest CVS of Zope and LM 0.8.8b1 with the included ZPatterns and Plugins. It was necessary to apply a patch (from Luca Mearelli on this list) on HTTPRequest.py to actually create the LM folder without raising a NameError exception on 'path.' I previously worked all the wrinkles out of my UserSource, etc., under Zope 2.1.2., so my difficulties in this case are purely upgrade related. Folders/Objects thusly: / (Root Folder) test (Test Folder) acl_users (LoginManager) index_html (Test Page) If I change the security settings on index_html to allow access from a test account role, all works fine. If however, I change the security settings on the test folder instead of index_html, it does not have the expected effect and I get the forbiddenpage, as if acquisition of these settings were not working. I did not turn off "Acquire Settings" on index_html. Pretty much all such settings have been left at the default settings except for adding the new roles to the test folder and enabling them in either the test folder or on the index_html object as indicated. As with may other things Zope Python, I don't understand yet how LM interacts with the mechanics of acquistion and security settings. Has anyone else tackled this yet who could provide some insights and/or a fix? Thanks in advance, Charlie -- ~ Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer... Visit the Radio For Peace International Website: http://www.rfpi.org/ ~ CLOBBER INTERNET SPAM: See!! http://spam.abuse.net/ Join!! http://www.cauce.org/ ~ QOTD: "Bush is a big corporation disguised as a human being running for president." -- Ralph Nader on David Letterman (9/28/00) ___ 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] Re: [Zope] Question about dtml-in
Sean McGrath writes: ... "dtml-in" treats sequences of two element tuples specially ... You are right. This is to support the frequent case of iterating over item sequences. There should be a "dtml-in" argument to switch off this special treatment. If I had your problem, I would go for such a solution (extending "dtml-in"). It should be easier than to work around the special treatment in DTML and it would help the Zope community as a whole. If you do not want to go this way, I would suggest to put a feature request into the Collector. Dieter ___ 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] [ANN] Zope 2.2 patch for cDocumentTemplate/Acquisition bug
Appended is a patch for the cDocumentTemplate/Acquisition bug. Usually, this bug manifests itself by an "AttributeError: __call__" for a folder object. The usual context is: DTML Document: . dtml-with folder !-- here is the Attribute Error -- /dtml-with . The patch modifies "C" code. This means you need a Zope source distribution to apply it and then you must regenerate Zope. Almost surely, the patch is not yet complete: The code in "cDocumentTemplate.c" looks like (Python emulating "C" code): if callable(o): if hasattr('isDocTemp') and o.isDocTemp: o= o(None,md) else: o= o() The remaining problem is that 'isDocTemp' might be acquired and does not belong to "o.__call__". In this case, "o" might be called with the wrong number of parameters. I would expect, that the problem disappears, when the "isDocTemp" test is performed with "o.aq_base" rather than "o". But I am not sure. Maybe, an acquisition expert can look into this remaining issue. Dieter --- lib/Components/ExtensionClass/:Acquisition.cSat Oct 7 20:40:53 2000 +++ lib/Components/ExtensionClass/Acquisition.c Sat Nov 4 21:10:04 2000 @@ -1391,6 +1391,31 @@ return r; } + +/* DM: adding "AqCallable_Check" */ +static int +aqCallable(PyObject *o) { + if (isWrapper(o)) { +PyObject *call; + +UNLESS(call=PyObject_GetAttr(o,py__call__)) { + PyErr_Clear(); + return 0; +} +Py_DECREF(call); return 1; + } else +return PyCallable_Check(o); +} + +static PyObject * +AqCallable_Check(PyObject *ignored, PyObject *args) +{ + PyObject *o; + + UNLESS (PyArg_ParseTuple(args, "O", o)) return NULL; + return PyInt_FromLong((long) aqCallable(o)); +} + static struct PyMethodDef methods[] = { {"aq_acquire", (PyCFunction)module_aq_acquire, METH_VARARGS|METH_KEYWORDS, "aq_acquire(ob, name [, filter, extra, explicit]) -- " @@ -1412,6 +1437,10 @@ {"aq_chain", (PyCFunction)module_aq_chain, METH_VARARGS, "aq_chain(ob [, containment]) -- " "Get a list of objects in the acquisition environment"}, + /* DM */ + {"callable", (PyCFunction)AqCallable_Check, METH_VARARGS, + "callable(ob) -- " + "return true iff the object is callable"}, {NULL, NULL} }; --- lib/python/DocumentTemplate/:cDocumentTemplate.cSat Jul 29 11:24:34 2000 +++ lib/python/DocumentTemplate/cDocumentTemplate.c Sat Nov 4 21:11:11 2000 @@ -95,14 +95,35 @@ static PyObject *py_Unauthorized_fmt, *py_validate; static PyObject *py__push, *py__pop, *py_aq_base; -/* - */ - static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;} #define ASSIGN(V,E) PyVar_Assign((V),(E)) #define UNLESS(E) if (!(E)) #define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V) #define OBJECT(O)(((PyObject*)O)) +/* - */ +/* DM: callable */ +static int (*callable)(PyObject *o); + +static PyObject *aq_callable; + +static int aq_callable_check(PyObject *o) { + PyObject *result= PyObject_CallFunction(aq_callable,"O",o); + int callable= PyInt_AsLong(result); + Py_DECREF(result); + return callable; +} + +static void init_callable() { + PyObject *aq= PyImport_ImportModule("Acquisition"); + if(aq + (aq_callable= PyObject_GetAttrString(aq,"callable"))) +callable= aq_callable_check; + else callable= PyCallable_Check; +} + +/* - */ + typedef struct { PyObject_HEAD PyObject *inst; @@ -370,7 +391,7 @@ { dt=0; - if (PyCallable_Check(e)) + if ((*callable)(e)) { /* Decide whether we have a document template */ if (rr=PyObject_GetAttr(e,py_isDocTemp)) @@ -917,6 +938,9 @@ PyDict_SetItemString(d, "__version__", PyString_FromStringAndSize(rev+11,strlen(rev+11)-2)); + + /* DM */ + init_callable(); if (PyErr_Occurred()) Py_FatalError("can't initialize module cDocumentTemplate"); ___ 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 )
Re: [Zope] Zope for medium/large sites
On Sun, Nov 05, 2000 at 02:13:55AM +, Tiago Antão wrote: bill.a If you have the hardware: bill.a o a dedicated SQL server to hold member authentication data We've Oracle as the backend. [...] bill.a That should be able to handle pretty much what you describe with ease. BTW, Do you know of any site with more than 10 registered users and lots of hits using zope? mydomain.com (I work for them, did the programming). There are 139216 members as I write this, and a couple hundred registrations each days. The system manages 315421 domains right now, but about 2000 new ones enter the database each day. The site gets about 50 hits/day. Everything works wery well (everything is on one computer, Oracle 8.1.6 and Zope 2.2.2 behind a proxy rewrite rule for apache), EXCEPT for the Zope being unstable. I think the culprit is the Oracle DA and I've sent a message to this mailing list, but noone seems to know what happens... -- Petru Paler, mailto:[EMAIL PROTECTED] http://www.ppetru.net - ICQ: 41817235 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] UML
Hi! I also don't know which question Douglas ment (see bottom of page) , but both should be worth a short (or not so short) answer from a DC guru. We for our current project use ObjectDomain (www.objectdomain.com) as case tool, but do not generate code for python or ZClasses with the tool by now, we use it just for drawing the models. The problem with ObjectDomain is that it is a nice tool, but: - its sort of unstable, sometimes it crashes and eats up parts of the model :( - I don't know if the guys still work on the project. Since end of april you can still download the Beta od Release 3, but nothing new on their site since then - lots of other bugs (e.g. export to Rational Rose is buggy) Since ObjectDomain is customizable through JPython it should be possible to make it able to generate/reverse engineer ZClasses (has anybody done that already?) Do you still use ObjectDomain at DC? At the Paris Zope meeting Paul Everitt told me that DC had many troubles with it too. phil *** REPLY SEPARATOR *** On 04.11.2000 at 13:03 Michel Pelletier wrote: Douglas Daniel Del Frari wrote: [snip] I'm not sure what you mean Douglas, do you want to know: 1) If we apply a design methedology to Zope or 2) How you can apply a design methedology to Zope? -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] 404 Error on /p_/ Zope management images
Hi, I moved a "legacy" Zope-2.1.6 installation, and I'm finding that the management interface cannot find the usual Zope icons for "Folder", "DTML Document", etc. In addition, Zope no longer has the standard objects like DTML Document, Image, etc. in the Add Object list. All the installed products show up and existing folders and documents also appear. I'm completely baffled. Anyone seen this type of behaviour? -- -- Andres Corrada-Emmanuel Email: [EMAIL PROTECTED] Director of Technologyhttp://www.mamey.com Mamey Phone: (413) 529-9993 -- -- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] User choosing content
Hi! Is there any product to let the user choose content (like my.yahoo.com)? Best regards, Tiago ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta
Fred Yankowski wrote: I agree completely that the Zope Book beta will get more reviewers, and better feedback to the authors, if it is available as PDF. A valid point. I do not care about the format that much. But what I care about is a clear method of referencing the text, to the line or paragraph level, so that we can get comments and corrections to the authors/copyeditors efficiently. A PDF *with page and line numbers* would fit the bill nicely. As would a HTML file with paragraph numbers (as HTML comments, maybe?). The point is that we should be able to give meaningful feedback, like "page 147, line 15: there should be their" (a totally made-up example, do not go hunting for that one). It just does not do to quote full sentences and have the copyeditor search for all that stuff. Too much wasted time on both ends. Cheers, Jan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta / inserting anchors into the official HTML?
Simon Coles wrote: I wholeheartedly agree with Jason and Chris. I would very much appreciate a PDF version that could be easily printed, or read with Adobe's Reader. If you have the full version of Adobe Acrobat (you have to pay for it, as opposed to the free Reader) you can "Capture" web pages into a PDF. I created a PDF of the Zope Book beta to read on the train today. PDFs created in this way are full text searchable :-) Well, that is not exactly the point - anybody can use, e.g., htmldoc (a very fine tool from www.easysw.com, which is not a big moneydrain as Adobe distiller is). The point in favor of a semi-official draft copy PDF is that it gives us a common reference frame for reviews and feedback. The PDF would mean everybody has the same page and line numbers, while HTML has no such concept. Hmmm. It would be pretty easy to cook up a script to number all the P tags and include that number in the HTML as comments or, even better, anchors so you can directly link to a paragraph). Of course this makes sense only if it is done consistently, i.e., at the source. That would certainly be fine with O'Reilly. Cheers, Jan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] university portal
Hi, I'm another Zope newbie with a few questions. My appologies if this message is being sent to the wrong mailing list. I'm a final year student doing a project to create a course/personal management system for my university. I understand there's quite a lot of similar work going on in this field already. I aim to create a database to store student information in (using mySQL or Zope?) which the user (the lecturer) can add content to (details of grades, etc) via a web browser and use for bulk manipulation of data... sending email amongst other things. In addition, I hope to provide a 'wizard' (in a browser window) to provide facilities for uploading lecture material, news, etc. to the course web page. Going through Zope's 'Elvis' tutorial this seems possible. [Q] Is it possible to present a user with various web forms to input information (say, a news article with headline content) that once submitted will be displayed on the page in a suitable format? I think Zope is capable of this... is Python/anything required. Are there any examples I can look at? I am in the process of reading the online Zope book - if anyone has any advice for reading material, I would be grateful to hear it :-) [Q] There are a lot of Zope products available - am I right in thinking that, say a 'Zope Discussion Board' product, could be download and integrated into a Zope-powered web-site? i.e. Are Zope products 'plug and play' TM? ;-o Thanks for the bandwidth, Lee ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Refrencing.
Jason C. Leach writes: dtml-let x=sequence-item What is the sintax to refrence that object? img src=dtml-var x.id This will give you a NameError (maybe KeyError), as the variable "x.id" is unknown. Are you interested in the "id" of "x"? Then the best thing is: dtml-with x dtml-var id /dtml-with Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Authorization Question
Terry Babbey writes: I have been unable to figure out how to let only certain people access a method. I have a method setup for people to modify our online phonebook but I want to restrict access to this method for obvious reasons. Any ideas how to accomplish this? You already looked at the Zope "UserManagement" documententation? E.g. in the upcoming Zope book? I am also wondering if anyone has been able to tie authentication into a unix passwd file? There are lots of UserManagement products around. Maybe, this is covered. Search "zope.org". A "PAM" based user management product might do what you have in mind. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] images in directories
Pete Prodoehl writes: Is it possible to have an image named "image.gif" or "image.jpg" ? (Are file extensions allowed? If so, how are those objects addresses?) It is. And it is quite common. There is a minor problem, if you like to put images in an "image" folder. But this is not related to filename extensions. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Obtaining just the filename for multiple file fields in an addformform
Darin Lee writes: ... accessing the name of an uploaded file ... This is an FAQ (-- searchable archive). Uploaded files are "ZPublisher.HTTPRequest.FileUpload" objects. From their source documentation: File upload objects are used to represent file-uploaded data. File upload objects can be used just like files. In addition, they have a 'headers' attribute that is a dictionary containing the file-upload headers, and a 'filename' attribute containing the name of the uploaded file. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] adding properties to all existing docs
michael angelo ruberto writes: i have a Zope containing 4700+ files and documents. i want to add new properties to all of them, how can i do this programmatically? is it possible to change the base classes? if so, how? It is possible to change the base class but I would not do it (as it affects all Zope objects and your change is likely to disappear when you upgrade). You can automate Zope either internally or externally. Internally (via a method (DTML or Python)) you would use ZopeFind to list all objects that need to be updated and then iterate (dtml-in) over the objects to update. Externally, you would use "ZPublisher.ZClient". I would go for the internal solution. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] university portal
I'm another Zope newbie with a few questions. My appologies if this message is being sent to the wrong mailing list. this is the list I'm a final year student doing a project to create a course/personal management system for my university. I understand there's quite a lot of similar work going on in this field already. I aim to create a database to store student information in (using mySQL or Zope?) or both. This really depends on what you want and how many users you expect . Some user management products (Zopish for components) are flexible enough to accommodate both. ZPatterns and a Zpattern based products (like LoginManager?) allow you to switch from one implementation to another halfway. Experimenting with ZPatterns is not a newby thing though... ;-) which the user (the lecturer) can add content to (details of grades, etc) via a web browser and use for bulk manipulation of data... sending email amongst other things. In addition, I hope to provide a 'wizard' (in a browser window) to provide facilities for uploading lecture material, news, etc. to the course web page. Going through Zope's 'Elvis' tutorial this seems possible. this is the realm Zope is suited for par excellence [Q] Is it possible to present a user with various web forms to input information (say, a news article with headline content) that once submitted will be displayed on the page in a suitable format? I think Zope is capable of this... is Python/anything required. Are there any examples I can look at? Yes, many. Try looking at Squishdot for a start. It's a flexible weblog style product (http://www.zope.org/Members/chrisw/Squishdot) The Zope Portal Toolkit may provide much of you want, but it's a project in the making (http://www.zope.org/Products/PTK) My own Zope Edu Course Framework (http://www.zope.org/Members/Hoekstra/ZECF) is a product for publishing courses online. It's intended for people with few technical web skills. However, this too is under development I am in the process of reading the online Zope book - if anyone has any advice for reading material, I would be grateful to hear it :-) watch the documentation pages, they will be much improved within a few days [Q] There are a lot of Zope products available - am I right in thinking that, say a 'Zope Discussion Board' product, could be download and integrated into a Zope-powered web-site? yes. i.e. Are Zope products 'plug and play' TM? ;-o many are, some are not.This really depends on the product.Most have installation instructions. They should tell you more. hth Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Where is the code?
Hi all, I have played with Zope and got everything working. It is however not clear to me how the code (DTML and so on) is merged into Zope and where it is kept. Would gurus out there point this to me? thanks. Philip ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] objectValues type?
Hello, I have this simple tree: dtml-tree branches="objectValues" skip_unauthorized="1" input type="checkbox" name="delItems:list" VALUE="dtml-var id" a target=main href="dtml-absolute_url;"dtml-var title_or_id/a/dtml-tree The anchor's target is main. But it if it is a Folder I want the target to be self. And I want to skip some items. How do I return the objectType (eg Folder, Document, Method) so I can alter the anchor, and/or object Properties that I might set to make other decisions? Thanks, Richard
[Zope] Problems with LoginManager 0.8.8b1
Hello, I am having an odd problem with LoginManager 0.8.8b1 and am writing the list in the hopes that someone can either help me out, or confirm that I've encountered a bug. I am running Zope 2.2.2 with Python 1.5.2 on a Linux box. I installed LoginManager as described, and compiled DynPersist and so forth for ZPatterns. All seems to be working well. I created a temporary folder called 'sandbox', inside of which I instantiated a LoginManager. In its UserSource (a Generic User Source), I created four Python Methods (with Python Methods v0.1.7): --- userAuthenticate paramsself, REQUEST, username, password/params if username == 'XXX' and password == 'XXX': return 1 else: return 0 --- userExists paramsself, REQUEST, username/params if username == 'XXX': return 1 else: return 0 --- userDomains paramsself, REQUEST, username/params return [] --- userRoles paramsself, REQUEST, username/params if username == 'XXX': return ['Manager', 'Member'] else: return ['Member'] Once done, I pointed my browser to http://myhost/sandbox/index_html. This method is a standard DTML Method, inluding standard_html_header and footer and putting some text in the middle. I get the following error: Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: index_html) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: index_html) KeyError: standard_html_header Zope can't find standard_html_header. I am guessing the acquisition path is getting hosed somewhere along the way. If I simply delete acl_users from sandbox (my LoginManager), index_html works fine. Moreover, it is not just standard_html_header that I can't acquire. I created a DTML Method called foo, and could not acquire it, either. Any ideas? --Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:[EMAIL PROTECTED] Going Virtual, L.L.C. http://www.goingv.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Disabling SiteAccess/SiteRoot ..
hi, I did that. Set the / to some web site and could not get back to the console. I think you can just remove the product and it will restore itself. You will then need to uninstall it from zope, and then reinstall the product. j. .. . Jason C. Leach ... University College of the Cariboo. .. On Sat, 4 Nov 2000, [Windows-1252] Jørgen Skogstad wrote: Kindest.. Of course I did something wrong. ;) I need to disable the SiteRoot i implemented.. because right now all is /#% up.. ;) Have you got any information about this? I am running this startup script as of now.. but it does nothing (esp. thinking of the env. variable that was stated on www.zope.org). #! /bin/sh #exec 21 SUPPRESS_ACCESSRULE=yahoo export SUPPRESS_ACCESSRULE PATH=$PATH:/usr/local/bin PYTHONPATH=$PYTHONPATH:/usr/local/lib/python1.5/site-packages reldir=/usr/local/zope/Zope-2.2.1-solaris-2.6-sparc/ PYTHONHOME=`cd $reldir; pwd` export PYTHONHOME export PYTHONPATH exec /usr/local/zope/Zope-2.2.1-solaris-2.6-sparc/bin/python \ $PYTHONHOME/z2.py \ -a 'localhost' \ -u 'zope' \ -m '' \ -f '' \ -p '' \ -F '8989' \ -d '' \ -w '' \ -D \ -Z '' "$@" Would apriciate any input! Kindest, Jørgen Skogstad ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] catalog DTML Document
"Finding"a bunch of DTML Documents into a Zcatalog is easy. But how to do that programmatically? I haven't even found a way of doing that for a single DMTL Document. -- Wolfgang Strobl ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Where is the code?
I have played with Zope and got everything working. It is however not clear to me how the code (DTML and so on) is merged into Zope and where it is kept. Would gurus out there point this to me? thanks. DTML and Zope (code) objects are kept in the object database. It is in zopehome/var/data.fs on your filesystem. If you create a new object, Zope creates a new instance of a class that is in Zope. They are defined in Products. The products are visible in your zope site at http://your.site/Control_Panel/Products Zope products/classes may be defined in Python modules. In that case the modules live in the zopehome/lib/python/Products directory. They may also be defined in ZClasses, which are defined completely through the web. They are not visible on the filesystem, only in Zope itself. I don't know whether that was your question, but DTML is interpreted at runtime by the Zope system. It takes the dtml bits from your template and returns the filled in template. hth Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Does anyone know if the RPMs work with Caldera?
Does anyone know if the RPMs work with Caldera?
Re: [Zope] ZServer serving CGI by itself
Eric, Thank you very much for the example code. That basically does what I want. However, I have a couple of added complexities. First, I have a lot of scripts, not just one. I'd like to have the equivalent of a ScriptAlias in Apache, where I can tell Zope to treat everything in a certain directory as a CGI script. Second, my scripts do funky things like set cookies for authentication. So I need to tell Zope to basically get out of the way after calling the CGI script. (Specifically, I don't want Zope sending the HTTP header.) Third, some of my scripts are long running processes and I'd like to be able to send results back to the client unbuffered. With Apache 1.3.x, I'm able to run Python scripts with the -u flag to the Python interpreter to force unbuffered output (i.e. you see the progress instead of having to wait for the script to finish). I'm thinking of writing a CGIScript product to handle this. My idea is that I could add a CGIScript object to any Zope folder, setting parameters as appropriate. Parameters could include: 1) name of CGI script to execute on host machine or name of directory containing CGI scripts 2) buffer output 3) script sends HTTP headers 4) environment variables 5) exception handling Has a general CGI product in Zope already been done? I've already written a few external methods in testing Zope, which is easy enough, but haven't yet tried to write a product. How hard is it? Anyone have any advice (aside from go with the flow and run Zope behind Apache)? Thanks, Fred P.S. Is standard_error_message broken in Zope 2.2.2? I couldn't figure out how to use error_value without the code in lib/python/ZPublisher/HTTPResponse.py throwing in extra html tags. I finally just edited that file and things seem to be working. Running with or without the -D flag didn't make any difference. Eric Walstad wrote: I have a C++ program I run from Zope and then return the results to Zope. Just like you described, I farm the work out to an external method which runs the CGI, grabs the results and hands them back to Zope. Be sure to hard code the line that calls your CGI. Otherwise, the External Method could be used to call any (potentially damaging) code on your Linux box. [snip] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta
In article [EMAIL PROTECTED], Jan H. Haul [EMAIL PROTECTED] writes Fred Yankowski wrote: I agree completely that the Zope Book beta will get more reviewers, and better feedback to the authors, if it is available as PDF. A valid point. I do not care about the format that much. But what I care about is a clear method of referencing the text, to the line or paragraph level, so that we can get comments and corrections to the authors/copyeditors efficiently. A PDF *with page and line numbers* would fit the bill nicely. As would a HTML file with paragraph numbers (as HTML comments, maybe?). The point is that we should be able to give meaningful feedback, like "page 147, line 15: there should be their" (a totally made-up example, do not go hunting for that one). It just does not do to quote full sentences and have the copyeditor search for all that stuff. Too much wasted time on both ends. Cheers, Jan I agree about the numbering, but even more I would like to know which version of Zope the book is supposed to be about. It mentions stuff such as XSLT methods, perl methods and python methods none of which are in an official zope. So is there an alpha of this future zope that we could use to check the book? -- Robin Becker ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] CGI product ( was ZServer serving CGI by itself )
Hi Fred, Wow, you've left me in the dust. I've not needed to try what you are attempting and I don't know how Zope would handle passing the RESPONSE buck to another application. I hope someone with more "Zen" can answer the particulars for you! Best of luck. Eric. // However, I have a couple of added complexities. // // First, I have a lot of scripts, not just one. I'd like to have the // equivalent of a ScriptAlias in Apache, where I can tell Zope to treat // everything in a certain directory as a CGI script. // // Second, my scripts do funky things like set cookies for authentication. // So I need to tell Zope to basically get out of the way after calling the // CGI script. (Specifically, I don't want Zope sending the HTTP header.) // // Third, some of my scripts are long running processes and I'd like to be // able to send results back to the client unbuffered. With Apache 1.3.x, // I'm able to run Python scripts with the -u flag to the Python // interpreter to force unbuffered output (i.e. you see the progress // instead of having to wait for the script to finish). // // I'm thinking of writing a CGIScript product to handle this. My idea is // that I could add a CGIScript object to any Zope folder, setting // parameters as appropriate. Parameters could include: // // 1) name of CGI script to execute on host machine or name of directory // containing CGI scripts // 2) buffer output // 3) script sends HTTP headers // 4) environment variables // 5) exception handling // // Has a general CGI product in Zope already been done? I've already // written a few external methods in testing Zope, which is easy enough, // but haven't yet tried to write a product. How hard is it? Anyone have // any advice (aside from go with the flow and run Zope behind Apache)? // // Thanks, // Fred // // P.S. Is standard_error_message broken in Zope 2.2.2? I couldn't figure // out how to use error_value without the code in // lib/python/ZPublisher/HTTPResponse.py throwing in extra html tags. I // finally just edited that file and things seem to be working. Running // with or without the -D flag didn't make any difference. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] insert but updates don't work
but get an authentication challenge that I can not pass. Is there something special about sql updates? I haven't used SQL in Zope but I experienced the same thing, an authentication request that cannot be satisfied even by the superuser account. For me I found that it happened when I was in a particular dtml-with block and I referred to the id property of the current object. I changed my dtml-var id to dtml-var title_or_id and the problem went away. I think there may be a bug in Zope regarding accessing the id properties of certain objects. I hope this is some use to you, it may be that you have a completely different problem though. I would be interested to hear the outcome once you get it working and work out what the problem was. Good luck Alex == Alex Bowyer IT Contractor, Logica Australasia Tel: +61 2 9202 8130 Fax: +61 2 9922 7466 E-mail : [EMAIL PROTECTED] WWW: http://www.logica.com.au/ == ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] insert but updates don't work
+---[ Bowyer, Alex ]-- | but get an authentication challenge that I can not pass. | Is there something special about sql updates? You don't have 'permissions' to an update, this is a ZSQL perms problem. You might need to give your update method a 'proxy' role to fix it. I thought this was fixed some time ago, do you have some particularly ancient version of Zope ? -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Where is the code?
Thanks Rik, You answered my question perfectly. This was my guess and found the Data.fs. This makes me wonder though how the implementation of the three tier separation, ie data/logic/presentation is achieved. Do you have any idea? What is the advantage of putting everything in a db? Apparently if the db down, we will lose everything and recovering from a db is pain as you may already know. Even though it is great performance improvement to load the db in RAM at run time, do you know of an other benefits? Philip Rik Hoekstra wrote: DTML and Zope (code) objects are kept in the object database. It is in zopehome/var/data.fs on your filesystem. If you create a new object, Zope creates a new instance of a class that is in Zope. They are defined in Products. The products are visible in your zope site at http://your.site/Control_Panel/Products Zope products/classes may be defined in Python modules. In that case the modules live in the zopehome/lib/python/Products directory. They may also be defined in ZClasses, which are defined completely through the web. They are not visible on the filesystem, only in Zope itself. I don't know whether that was your question, but DTML is interpreted at runtime by the Zope system. It takes the dtml bits from your template and returns the filled in template. hth Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Question about dtml-in
Sean McGrath wrote: Hello all, I have a question about the dtml-in tag. When it is iterating over a sequence, and the items in the sequence happen to be tuples containing exactly two items, then dtml-in places the first item from the sequence in sequence-key, and the second item goes in sequence-item. If the items in the sequence are not tuples of two items, then sequence-item contains the whole item. For example, if I have: dtml-in "[(1,2),(3,4),(5,6)]" dtml-var sequence-item /dtml-in then I get 2,4,6 when I view this. The 1, 3 and 5 have been assigned to sequence-key. Now, if I change the dtml to be this: dtml-in "[(1,2,3),(3,4,5),(5,6,7)]" dtml-var sequence-item /dtml-in then I get (1,2,3)(3,4,5)(5,6,7) which is what I would expect. I think the reason for this behaviour is to do with iterating over dictionaries, but I'm not sure. The problem I have is this: I have code which retrieves data from a database, and the result is a list of tuples, with each tuple corresponding to a record, and each item in the tuple corresponding to a field. I don't know in advance how many fields will be in the record. I want to iterate over the records and fields, wrapping them in a html table. If the database I'm talking to happens to return a list of records with two fields, ie a tuple of two items, I have to handle this differently than any other case, which makes for some ugly code. I haven't been able to find any way to avoid this, unless I'm missing something. Any information would be greatly appreciated. Regards, in addition to Dieter Maurer's suggestion of fixing this behavior in dtml-in, another possibility is to do the work in a web python method, and directly access the Result object from the query to generate the html. Result object api. /lib/python/Shared/DC/ZRDB/Result.py ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] sending query output as an attachment
Hi, Thanks for your response. I think in the dtml tags you sent, we have store the attachment to be sent as a file right ?. How to store the output of query in zope(eg: output details of employee) as a file then send it as an attachment.Is it possible to send the output report as an attachment without storing it as a file ? if so, please tell me how ?. waiting for your reply Thanks, bye, jacintha ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Question on manage_pasteObjects
I have a ZClass based on OFS:File. The problem is that I can't paste a instance of that class except that I am a "Manager". In other roles, I get a error message which says that that object(instance of my ZClass) doesn't support the paste operation. The work-around is: to set the proxy role of a wrapper DTML-method ( which calls manage_pasteObjects) to be "Manager". I think this work-around gives too much permissions. It implies that user can paste everywhere, doesn't it? My question : is there any better way or probably right way to do the same thing? ( I have tried to check all permissions for that role in context, well, it doesn't work) Thanks. Yap, Singuan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta
"Jan H. Haul" wrote: The point is that we should be able to give meaningful feedback, like "page 147, line 15: there should be their" (a totally made-up example, do not go hunting for that one). It just does not do to quote full sentences and have the copyeditor search for all that stuff. Too much wasted time on both ends. Jan, We have very little experience in documentation delivery and maintenance. It's sad but true. We are however working to resolve the problem. Please take a look at the documentation process wiki, where we have a section for discussing delivery issues: http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage Look under 'CurrentIssues'. Please place any suggestions or ideas you have there. -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Book Beta
Robin Becker wrote: I agree about the numbering, but even more I would like to know which version of Zope the book is supposed to be about. When it hits the shelves, it will be about 2.3. After that, we will maintain the book to be in sync with the current release according to the as-yet-unofficial documentation development process: http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage It mentions stuff such as XSLT methods, perl methods and python methods none of which are in an official zope. I belive all reference to xslt methods has been removed. Python methods will be part of the 2.3 release, and Perl methods are mentioned in the book as being a component add on that must be installed. So is there an alpha of this future zope that we could use to check the book? Check out Zope and Python Methods from CVS. Perl Methods can be downloaded from the Perl wiki on (I believe) dev.zope.org. -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] insert but updates don't work
On Mon, 6 Nov 2000 11:20:12 +1000 Andrew Kenneth Milton [EMAIL PROTECTED] wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* +---[ Bowyer, Alex ]-- | but get an authentication challenge that I can not pass. | Is there something special about sql updates? You don't have 'permissions' to an update, this is a ZSQL perms problem. You might need to give your update method a 'proxy' role to fix it. I thought this was fixed some time ago, do you have some particularly ancient version of Zope ? Using 2.1.3. Is this considered ancient? I have a work round, and now find what I was trying to do has not succeeded in speeding up my queries :-( -- Graham Chiu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] how to retrieve variables values from the URL
Hi, In lookup query when i give the input as Emp_no submit it , following url comes in the browser address space. http://192.168.222.217:8080/project/Admin/looktool_report?Emp_no=4SUBMIT=Su bmit+Query how can i retrieve the variables values from the URL using dtml tags Thanks, bye, jacinth ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] insert but updates don't work
+---[ Graham Chiu ]-- | | You don't have 'permissions' to an update, this is a ZSQL | perms problem. | You might need to give your update method a 'proxy' role | to fix it. | | I thought this was fixed some time ago, do you have some | particularly | ancient version of Zope ? | | Using 2.1.3. Is this considered ancient? I would say yes at this stage. I wouldn't recommend any release below 2.2 any more, and 2.3 is coming RSN. While in terms of elapsed time it's not that long, web technology is moving pretty quick, and 2.2 closes some large security holes. | I have a work round, and now find what I was trying to do | has not succeeded in speeding up my queries :-( That's a bummer. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] More updates on documentation documentation
I've added more updates on documentation and worked in the comments recieved from Shane. To help you help us, I added some text on where we need the most attention, check the CurrentIssues for more info. http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage This process will define how we create documentation at Digital Creations, and will have far-reaching effects on how each of us contributes, maintains, and understands documentation. So far, Amos and I have proposed a prototype documentation process for synthesis, authoring, editing, reviewing, delivering, and maintaining documentation based on our experiences writing the Zope Book. We have tried hard to be as realistic as possibly in defining a very workable process, but our experience is obviously limited to one artifact, and the pain of living with no real process to date. We would really like to hear what you all have to say about our proposal and our prototype. If you think our prototype has holes in it, please leave your comments in the wiki and we will take them very seriously. We would like to hear comments from: The PythonLabs folks, since they have lots of experience authoring, maintaining and delivering extremely useful documentation. The ZDP folks, who represent the segment of the community most interested in documenting Zope. The DC geeks, since this process will effect, fundamentally, how we all do our jobs. The community developers, since they represent an audience for whom we have little documentation, and where we will focusing much of our upcomming efforts. The community users, since they represent the need for the highest clarity, best documentation, and because they represent the majority audience. In other words, we want to hear from you all! Our goal is to make documentation one of Zope's best features, so let us know how you think we can do that! Thanks, -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Combining products
From: Anders Eriksson [mailto:[EMAIL PROTECTED]] I would like to have the membership and the other parts from PTK added to the Squishdot (or the other way around - which ever is easiest). I am afraid that there is no easy way of doing that. It would be like combining any other 2 applications. Regards Max M ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Question about dtml-in
Sean McGrath writes: ... "dtml-in" treats sequences of two element tuples specially ... You are right. This is to support the frequent case of iterating over item sequences. There should be a "dtml-in" argument to switch off this special treatment. If I had your problem, I would go for such a solution (extending "dtml-in"). It should be easier than to work around the special treatment in DTML and it would help the Zope community as a whole. If you do not want to go this way, I would suggest to put a feature request into the Collector. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [ANN] Zope 2.2 patch for cDocumentTemplate/Acquisition bug
Appended is a patch for the cDocumentTemplate/Acquisition bug. Usually, this bug manifests itself by an "AttributeError: __call__" for a folder object. The usual context is: DTML Document: . dtml-with folder !-- here is the Attribute Error -- /dtml-with . The patch modifies "C" code. This means you need a Zope source distribution to apply it and then you must regenerate Zope. Almost surely, the patch is not yet complete: The code in "cDocumentTemplate.c" looks like (Python emulating "C" code): if callable(o): if hasattr('isDocTemp') and o.isDocTemp: o= o(None,md) else: o= o() The remaining problem is that 'isDocTemp' might be acquired and does not belong to "o.__call__". In this case, "o" might be called with the wrong number of parameters. I would expect, that the problem disappears, when the "isDocTemp" test is performed with "o.aq_base" rather than "o". But I am not sure. Maybe, an acquisition expert can look into this remaining issue. Dieter --- lib/Components/ExtensionClass/:Acquisition.cSat Oct 7 20:40:53 2000 +++ lib/Components/ExtensionClass/Acquisition.c Sat Nov 4 21:10:04 2000 @@ -1391,6 +1391,31 @@ return r; } + +/* DM: adding "AqCallable_Check" */ +static int +aqCallable(PyObject *o) { + if (isWrapper(o)) { +PyObject *call; + +UNLESS(call=PyObject_GetAttr(o,py__call__)) { + PyErr_Clear(); + return 0; +} +Py_DECREF(call); return 1; + } else +return PyCallable_Check(o); +} + +static PyObject * +AqCallable_Check(PyObject *ignored, PyObject *args) +{ + PyObject *o; + + UNLESS (PyArg_ParseTuple(args, "O", o)) return NULL; + return PyInt_FromLong((long) aqCallable(o)); +} + static struct PyMethodDef methods[] = { {"aq_acquire", (PyCFunction)module_aq_acquire, METH_VARARGS|METH_KEYWORDS, "aq_acquire(ob, name [, filter, extra, explicit]) -- " @@ -1412,6 +1437,10 @@ {"aq_chain", (PyCFunction)module_aq_chain, METH_VARARGS, "aq_chain(ob [, containment]) -- " "Get a list of objects in the acquisition environment"}, + /* DM */ + {"callable", (PyCFunction)AqCallable_Check, METH_VARARGS, + "callable(ob) -- " + "return true iff the object is callable"}, {NULL, NULL} }; --- lib/python/DocumentTemplate/:cDocumentTemplate.cSat Jul 29 11:24:34 2000 +++ lib/python/DocumentTemplate/cDocumentTemplate.c Sat Nov 4 21:11:11 2000 @@ -95,14 +95,35 @@ static PyObject *py_Unauthorized_fmt, *py_validate; static PyObject *py__push, *py__pop, *py_aq_base; -/* - */ - static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;} #define ASSIGN(V,E) PyVar_Assign((V),(E)) #define UNLESS(E) if (!(E)) #define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V) #define OBJECT(O)(((PyObject*)O)) +/* - */ +/* DM: callable */ +static int (*callable)(PyObject *o); + +static PyObject *aq_callable; + +static int aq_callable_check(PyObject *o) { + PyObject *result= PyObject_CallFunction(aq_callable,"O",o); + int callable= PyInt_AsLong(result); + Py_DECREF(result); + return callable; +} + +static void init_callable() { + PyObject *aq= PyImport_ImportModule("Acquisition"); + if(aq + (aq_callable= PyObject_GetAttrString(aq,"callable"))) +callable= aq_callable_check; + else callable= PyCallable_Check; +} + +/* - */ + typedef struct { PyObject_HEAD PyObject *inst; @@ -370,7 +391,7 @@ { dt=0; - if (PyCallable_Check(e)) + if ((*callable)(e)) { /* Decide whether we have a document template */ if (rr=PyObject_GetAttr(e,py_isDocTemp)) @@ -917,6 +938,9 @@ PyDict_SetItemString(d, "__version__", PyString_FromStringAndSize(rev+11,strlen(rev+11)-2)); + + /* DM */ + init_callable(); if (PyErr_Occurred()) Py_FatalError("can't initialize module cDocumentTemplate"); ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )