Re: [Zope] ZSql Strange Error
Casey Duncan wrote: > > Duh, maybe I should learn to read. :-) > Let me know if this is any better, It worked! Thanks. []s -- César A. K. Grossmann http://members.xoom.com/ckant/ ___ 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] ZSql Strange Error
> I'm not sure why this should *crash* zope, but you can do it with a much > simpler query and a little DTML coding. The following should work > (UNTESTED): It cannot help me. I have two tables. One called cad_exportacao, and the other is called user_codigo. The table user_codigo maps every username with one or more rows at cad_exportacao. I wanna fill a SELECT input with all rows in cad_exportacao, but wanna all the records that exists for 'username' in user_codigo to be selected. There was the howto that explains how to do this at http://www.zope.org/Members/Roug/select_with_multiple, but it not works for me... []s -- César A. K. Grossmann http://members.xoom.com/ckant/ ___ 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] ZSql Strange Error
Hi! I'm trying to emulate an outter join in a Z SQL, but Zope crashes every time I try the query. The query is defined as: -*-*- parameters: username query definition: select codigo, nome, 'T' as select from cad_exportacao where codigo in ( select codigo from user_codigo where username = and tipo = 'E' ) union all select codigo, nome, 'F' as select from cad_exportacao where codigo not in ( select codigo from user_codigo where username = and tipo = 'E' ) -*-*- The log messages says there's not a 'cad_exportacao' relation (that is not true, the relation exists). Zope 2.2, Linux 2.2, PostgreSQL 7.0, ZyGreSQLDA 0.03 (from the README). What is wrong? What I can do to get the job done (I need to fill an multiselect with 'codigo', 'nome' from 'cad_exportacao', and if exists any 'codigo' for 'username' in 'user_codigo', the option must be selected - I tryed the "Filling MULTIPLE SELECT ... HOWTO', but it doesn't works for me, and I don't know why)? TIA -- César A. K. Grossmann http://members.xoom.com/ckant/ ___ 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] Filling Multiple Select Problem
Hi! I'm using the example at the "Filling MULTIPLE SELECT OPTION's with database lists", and a little step doesn't works. I heve the following in the DTML Method that fills two SELECT in a Web Form: (...) (...) The code above runs. To verify that, I put a and a , that prints the contents of the lists above. The code that is not running is the one bellow: SELECTED > (...) The code above creates a SELECT list like the one bellow: NOME 1 NOME 2 NOME 3 (...) but the part doesn't function. I have some of the values of "codigo" in the cadExportacao list, but the "SELECTED" corresponding code doesn't appears. Can someone tells me what is wrong? Sorry the bad english... []s -- +-+-+ | César A. K. Grossmann | Capacitação Solidária | | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ | | http://members.xoom.com/ckant/ | Clique e doe - é de graça | +-+-+ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html Any member introducing a dog into the Society's premises shall be liable to a fine of one pound. Any animal leading a blind person shall be deemed to be a cat. -- Rule 46, Oxford Union Society, London ___ 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] GUF error: Unauthorized...
Hi! I have created a GUFTest folder. It runs perfectly with the user 'jorge', provided with the GUF. After I have changed the acl to use a SQL connection, I'm getting the error bellow (in the log of the system): GUF[7909]: http://localhost.localdomain:8080/GUFTest/acl_users/userAuthenticate raised an exception (('Unauthorized', 'crypt', )) The source of the HTML page contains (I don't know if it's correct, because I suspect that Netscape reloads the page when you ask it to show the source of the page): What is wrong? I have created a local role called 'Usuario'. This role have the rights to: /GUFTest: Access contents information Can Login an Logout Use database methods View /GUFTest/acl_users: Access contents information Can Login an Logout Use database methods View The Anonymous role have the rights: /GUFTest: _no_roles_ /GUFTest/acl_users: Access contents information Can Login and Logout The userAuthenticate, userDomains, userList, adn userRoles DTML Methods are configurated to proxy the Manager role. I'm using Zope 2.2.1, on a Conectiva Linux 5.0 (Linux i386 2.2.14, python 1.5.2, glibc 2.1.3). TIA -- +-+-+ | César A. K. Grossmann | Capacitação Solidária | | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ | | http://members.xoom.com/ckant/ | Clique e doe - é de graça | +-+-+ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html The ideas of economists and political philosophers, both when they are right and when they are wrong, are more powerful than is generally understood. Indeed, the world is ruled by little else. -- John Maynard Keyes ___ 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] Passing parameters to methods - how to?
Hi! I'm making my own user managements methods, and I'm stucked with a (simple) problem: How do I call another DHTML method, passing parameters to it, in HTML? I'm using a DTML Method that gives me a list of usernames. I want to click on the username and get the properties for that username. I wrote another DTML Method to do that, but I don't know how to pass the username to this second DTML Method. The username list page have, for every user, a line like that (suppose two usernames, fred and jorge): fred jorge How do I pass the username to the ManageUserProperties DTML Method? I have tried to use something like: fred jorge It works, but the ManageUserProperties DTML Method have another form in it, that calls itself, using the POST method: Clicking in the "submit" button, it gives me an error, telling that 'username' is not defined. So I included an hidden field with name="username" and value="", but I'm thinking this is not the better way to do that... Can someone helps me? TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] Cookie pointer.
Steve Drees wrote: > > > What can I do to this code works? > > Can you cut and paste the offending code? Exactly the same of the message of Thomas: "You have cookies enabled" "Your browser does not support cookies" If I get rid of the 'expires' parameter, I receive allways the same "Your browser does not support cookies". Even when the cookies suport is enabled... The code changed looks like: Cookies enabled. disabled. (spaces/blank lines added to make it more readable). -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] Cookie pointer.
TMGB wrote: > > Since cookies have been brought up, I tried the following code (Using > Steve's example): I cannot use this code in a GUF/docLogin. I get the error: "Unauthorized You are not authorized to access ZopeTime. " What can I do to this code works? []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] GUF strange behavior
Hi! I have discovered that I was fighting the wrong fight, against GUF. After making a login, I get the old, good, login page again. If I reload the page, then I get the correct index_html page, instead of the login page. What is wrong with this? I put the "pragma" "no-cache" in a META tag in the header of the docLogin method, but I still needs a reload to get the right page, instead of the login page. Is it a Netscape bug? Is it a GUF bug? Is it my mistake? I'm using Zope 2.1.6, GUF 1-2-4 in a Linux 2.2.x box. TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] Zope to PostgreSQL Connection?
Hi I'm with some troubles to connect a freshly installed Zope 2.2.1 on a Conectiva Linux 5.0 (glibc-2.1.2, the rest is the same as Red Hat 6.x) to a PostgreSQL 7.0.2 database. The ZPyGreSQLDA (http://www.zope.org/Members/reedstrm/ZPyGreSQLDA-rjr) "is broken". I tried to get the PoPyDA working, but cannot compile the PoPy module (it complains about libcrypt - that is already installed). Can someone point's me to a useful documentation about what is needed to get PoPy compiled, or another way to connect a Zope 2.2.1 to a PostgreSQL database. Trying to compile PoPy 1.3.6: [root@bit PoPy-1.3.6]# ./configure loading cache ./config.cache checking for python... /usr/bin/python checking python version... 1.5 checking python installation prefix... /usr checking python installation exec_prefix... /usr checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python1.5/site-packages checking location of python shared modules... $(exec_prefix)/lib/python1.5/site-packages checking for main in -lcrypt... no Warning: next test can fail because of a missing libcrypt checking for PQconnectStart in -lpq... no configure: error: can't build without PostgreSQL libraries Do we have a crypt library somewhere? [root@bit PoPy-1.3.6]# locate lib/libcryp /lib/libcrypt-2.1.2.so /lib/libcrypt.so.1 /usr/lib/libcrypto.so /usr/lib/libcrypto.so.0 /usr/lib/libcrypto.so.0.9.4 /usr/lib/libcrypt.a /usr/lib/libcrypt.so /usr/lib/libcrypto.a Who owns that files? [root@bit PoPy-1.3.6]# locate lib/libcryp | xargs rpm -qf | sort | uniq glibc-2.1.2-11cl glibc-devel-2.1.2-11cl openssl-0.9.4-4cl openssl-devel-0.9.4-4cl []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] From a Folder to a Product
"R. David Murray" wrote: > > If you put everthing at the top level except the DB connection, and > put the appropriate one of those in each user's folder, I should > think they could access the report via acquisition. You mean, put all sql-queries, dtml-docs and dtml-methods spread in the root folder of the zope? I'm trying to maintain the root uncluttered ("every thing in it's place, every place with it's thing"), and I'm thinking this will do the oposite, but you give me an idea: / + reports + files (sql queries, reports/forms, and default sql-conn) + customer1 | + sql connection (only) + customer2 | + sql connection (only) (...) Have anyone a better one idea/suggestion? Of course, making things like that, I lose versioning (I think), but I think I can survive without it... []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] From a Folder to a Product
Hi! I'm pretty satisfied with a group of reports I have done in Zope, and want to put a copy of it in every customer's folder I have in the Zope Server. Are there a document/tutorial I can use as a guide or tutorial to do this? If someone wants to point some general guidelines, the folder contains only the dtml docs/methods and SQL connection/SQL Queries used to do the report, and the only thing that changes from one to another customer is the SQL connection (every different customer have his own database). Even the security properties are the same. It can be draft as bellow: / +-- Report +- SQL Connection (PostgreSQL) +- SQL queries +- Reports based on the SQL queries +- Forms that are used to chose parameters and call the Reports +- index_html, standart_error, standart_html_header/footer TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] dtml-in 'one record per page' problem
Dieter Maurer wrote: > > What does is mean: "presents only two pages"? Submitting the form gives the first page. Hitting the "next" link, gives another page, and no "next" link. > Probably, you get wrong navigation elements. > This would be due to a bug for "". > > There is a patch for this at > > URL:http://www.dieter.handshake.de/pyprojects/zope/dt_in.pat I have used the patche, and things looks good now. Thanks. > There was an announcement in this list around June 10, 2000. I think I have missed it... > AFAIK, the patch is integrated into Zope 2.2. I'm afraid to upgrade to Zope 2.2 right now. > You should use "orphan=0". "orphan=1" allows for one "orphan" to be > moved, i.e. you may get 2 records on a page. Again, thank you for this. The form is working now. []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] dtml-in 'one record per page' problem
Hi! I'm using a report that must return one instance by page, but it's not working very well... If the query returns more than one result, Zope presents only two pages. I'm using Zope 2.1.6 in a Linux box. Here are a excerpt of the dtml code used: (previous) ... a lot of ... (next) No records. In case someone is wondering about the utility of a report with only one record per page, all I can say is that this is a very big one record, and the original idea was to present only one record at time. -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] GUF + SQL connection problem
I'm trying to add a SQL connection to GUF, and getting an error when trying step 8 of the How To ("HOWTO Use GenericUserFolder with an SQL Database"): "You are not authorized to change change_password_report because you do not have proxy roles. " The step 8 says (http://www.zope.org/Members/hippy/GUF_SQL_crypt_1_2): [snip] 8. Set permissions to protect the use database. It is now time to setup the permissions on the GUF objects to ensure that the SQL methods can only be called the code that we have created. Create a user defined role called Authoriser in the acl_users folder do not give it any permissions.[ok: created at the folder that contains the GUF] set the 'Use Database Methods' permission for 'Authoriser' on all the SQLMethods created above.[ok] set the Proxy role "Authoriser" on: change_password_report [oh-oh] userAuthenticate userList userRoles [snip] I'm doing it as a user that have the 'Manager' role at the root of the Zope site. The same username exists in the GUF, but I cannot change its roles (trying this trashes the connection). I'm using GUF 1-2-4. Zope is the 2.1.6, and connected to a PostgreSQL 7.0.1 (it works). TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] [Fwd: [Zope] GUF Problem]
One reply I get from Mario: Mario Premke wrote: > > I remember I had the same problem. > In GUF's acl_user folder I gave the special_role > the same permissions as the anonymus role. > As far as I remember that did it ... -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] GUF Problem
Richard Moon wrote: > > I don't think GUF works in its current release, or maybe the set-up > instructions are incomplete. I used it before and it was ok but I tried the > latest release and had the same problem as you. I reported it to GUF's > author but didn't get a reply. I just added a SQL user database, and will try to make it run. > I've reverted back to standard ACL folders for the moment. My problem is the little window with "Zope" in it, when the user tries to logon. If there was a way to customize it to anything I want, I stay with the standart ACL. I'm using GUF only because of the docLogin methot, that allows me to customize the login page. []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] GUF Problem
Hi! I'm trying the "HOWTO: GenericUserFolder Walkthrough" and, in the very last step (trying to login as 'jorge'), every time I press the 'Ok' button, I get the same login screen. Looking at the source of it, I see the message: What is wrong? I'm using Zope 2.1.6 (patched to that security problem), on a Conectiva Linux box. TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] LoginManager HOWTO?
Stuart 'Zen' Bishop wrote: > > But do you want advanced? If you just want to store your authentication > information, UserDB is just fine - moving to GenericUserFolder in > this case may just cause you troubles, as more advanced also means > more complicated. I need to provide a logon screen more informative than the default dialog box. Can I do it with UserDB (I have tried, and have not found any information about it). I have tried it and have to figure out by myself the table and column names and types. I have created one Gadfly connection (only for testing purposed), and created the tabel users, as bellow: create table users ( usernamevarchar, passwordvarchar, domains varchar, roles varchar ) I suppose it is correct, but I'm not sure (it worked). > GenericUserFolder is what you have to move to if you are > in a more peculiar environment or want to use Radius authentication. I have tried the GUF Walktrough and it doesn't works for me (the very last part, trying to logon as 'fred', doesn't work). I'm using SiteRoot, Apache proxying a zserver, and a Squid cache. All in the same machine... TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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] LoginManager HOWTO?
Hi! I'm trying to produce a web site with user authentication, and was looking for something more customizable than the standard user authentication mechanism provided by Zope. My first step was look in the Zope page, making a search on the term 'authentication'. I found three products: UserDB, GenericUserFolder, and LoginManager. Reading the page at the UserDB I found the bellow: "Update (10/30/99): Zen has posted a product that has more functionality than UserDB, called GenericUserFolder. " Well, looks like the GenericUserFolder is more advanced. So I go to its page. In it there are another observation: "Deprecated This product is being deprecated in favor of the LoginManager. LoginManager is what I like to believe that GUF would have been if I didn't have to write it in a hurry." Well, the next step is going to the LoginManager and try to figure out how to install it and put it in my web site. I get the package (I'm using the Linux version of Zope, in a Conectiva Linux 4.2 - like Red Hat 6.x -, installed from the rpm packages found in the Zope site), and, after some troubles to make ZPatterns fully functional, I get it installed. So now? No HOWTO explaining how to put it to run. Well, go to the mailing list, and search old messages. No one helps me... I'm looking for a sequence of steps needed to configure and use the LoginManager. How to add users? How to add local roles? How to integrate it whith LDAP (not for now, but in the future)? How to use a RDBMS server, like PostgreSQL, to store the accounts (in case I cannot put LDAP up an running)? I'm not a Python programmer, and I have a limited knowledge of Zope and DTML, and my english is only better than your portuguese... TIA -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ ___ 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 )