[Zope] Re: Zope Digest, Vol 17, Issue 37

2005-11-01 Thread <-bhavana ->
hi, 
can you provide some tutorials how to use ParsedXML?
 
thankx in advance.
On 11/1/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Send Zope mailing list submissions to   zope@zope.orgTo subscribe or unsubscribe via the World Wide Web, visit
   http://mail.zope.org/mailman/listinfo/zopeor, via email, send a message with subject or body 'help' to   
[EMAIL PROTECTED]You can reach the person managing the list at   [EMAIL PROTECTED]When replying, please edit your Subject line so it is more specific
than "Re: Contents of Zope digest..."Today's Topics:  1. marshall zsql results (Christopher Rivard)  2. Re: marshall zsql results (Tino Wildenhain)  3. Silva (Piotr Konstanty)
  4. Re: Silva (bruno desthuilliers)--Message: 1Date: Sun, 30 Oct 2005 17:11:23 -0700From: Christopher Rivard <
[EMAIL PROTECTED]>Subject: [Zope] marshall zsql resultsTo: zope@zope.orgMessage-ID: <[EMAIL PROTECTED]
>Content-Type: text/plain; charset=ISO-8859-1; format=flowedHello,I am having a little difficulty with a result object from ZSQL.The MySQL form input is a series of checkboxes that are creating a
"mapping table".I have gone round and round and landed here:The checkboxes are marshalled as:list_map_dir_id:list:intSQL like this:insert into listing_map (list_map_dir_id, list_map_list_id) values
(,)MySQL data type is int for this column.All of this works fine, but ideally I would like to manipulate the id's
as a list.I have tried a few variations and regularly run into "len of unsizedobject" if I try to insert as a varchar or insert the full list as[0,1,2,3,4]I have tried a few different MySQL data types, but no luck.
Retrieving the results like this:select * from listing_map where list_map_list_id = And mapping them back to the directory table like this:select t1.*from directory as t1
left join listing_map as t2on t1.dir_id = t2.list_map_dir_idwhere t1.dir_id = t2.list_map_dir_id && t2.list_map_list_id = list_id>Is there a way to marshall the results of this ZSQL object back into a list?
I am branching the subsequent forms based on the above query results.The difficulty I am running into are exclusion situationsA and B not CSeems like it would be easier if I could loop through and pull id's from
a list.  Maybe I'm asking the wrong question.Thanks in advance,Chris--Message: 2Date: Mon, 31 Oct 2005 07:28:31 +0100From: Tino Wildenhain <
[EMAIL PROTECTED]>Subject: Re: [Zope] marshall zsql resultsTo: Christopher Rivard <[EMAIL PROTECTED]>Cc: 
zope@zope.orgMessage-ID: <[EMAIL PROTECTED]>Content-Type: text/plainAm Sonntag, den 30.10.2005, 17:11 -0700 schrieb Christopher Rivard:
> Hello,>> I am having a little difficulty with a result object from ZSQL.> The MySQL form input is a series of checkboxes that are creating a> "mapping table".>> I have gone round and round and landed here:
>> The checkboxes are marshalled as:> list_map_dir_id:list:int>> SQL like this:>> > insert into listing_map (list_map_dir_id, list_map_list_id) values
> (,> > )> > This isnt that bad - you just get a bounch of insert statements
which should work.> MySQL data type is int for this column.>> All of this works fine, but ideally I would like to manipulate the id's> as a list.SQL knows no list, so the above is probably best you can do.
Otoh, you could manipulate the values as ARRAY and use thedatabase functions to select from array to table - dependingon your database.> I have tried a few variations and regularly run into "len of unsized
> object" if I try to insert as a varchar or insert the full list as> [0,1,2,3,4]> I have tried a few different MySQL data types, but no luck.>> Retrieving the results like this:
> select * from listing_map where list_map_list_id = You should get into the habit of specifying the column namesliterally to avoid changes of order and case of your columnsas they come from the database. Also you dont retrieve columns
you might not need (if you extend the table later).> And mapping them back to the directory table like this:>> select t1.*> from directory as t1> left join listing_map as t2> on 
t1.dir_id = t2.list_map_dir_id> where t1.dir_id = t2.list_map_dir_id && t2.list_map_list_id = > list_id>Write AND instead of && - && isnt SQL standard and makes it harder for
you to change the database.> Is there a way to marshall the results of this ZSQL object back into a list?ZSQL objects is a bit confusing. You probably mean the DTML elements ofthe ZSQL Methods. As I said, there is no list in SQL and Array
is a bit specific to databases. For example you could do somethingliketype=string>would render '{1,3,4,5,6}' to the database which in Postgres would
be an array.> I am branching the subsequent forms based on the above query results.> The difficulty I am running into are exclusion situations>> A and B not C>> Seems like it would be easier if I could loop through and pull id's from
> a list.  Maybe I'm asking the wrong question.You sho

Re: [Zope] URL Rewriting chaos

2005-11-01 Thread Andreas Jung



--On 1. November 2005 08:38:16 + [EMAIL PROTECTED] wrote:


Hi,
I've tried everything in both the Zope and Plone books and read the
Apache URL Rewrite guide also, but I just can't seem to get the silly
thing working!
I'm sure that it does ;-) but for some reason it is beyond me.
Let me tell you what I've tried, and tell me which one should work:
I am using apache to rewrite the urls.
1. Host monsters, both one in the zope root folder, and multiple in each
plone site's folders.  I have tried both with the mappings and without
(even though the books say they're not needed with apache).


You only need *one* VHM in the Zope root but not multiple VHM instances.


2. apache rewrite rules, this is how (the current attempt looks)
please assume that the big url is all on one line, email programs may
have changed that.

   ServerName example.net
   RewriteEngine On
   RewriteRule ^/(.*)
http://example.net:8080/plone_site/VirtualHostBase/http/example.net:80/Vi
rtu alHostRoot/$1 [L,P]

I have tried all combinations of things in the 'example.net' places
above, including the fqdn, local ip number and local host name.
Is there a shortcoming in the documentation here?


The documentation - at least the one in the Zope Book - is fine.
At least check if mod_proxy is installed and enabled. The *example* 
configuration above looks fine and it supposed to work - in fact it is work 
in lots of installations. Triple check your setup and enable logging for 
mod_rewrite...look at your Apache logs and look at the Zope logs and 
compare, lock at thre rewrite debug logsthat's the way to go...


-aj







pgpPYBhFIwqdB.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Silva

2005-11-01 Thread bruno desthuilliers
Piotr wrote:
> Thank you Bruno for your answer. 
> On Mon, 31 Oct 2005, bruno desthuilliers wrote:
> 
> 
>>Piotr Konstanty wrote:
>>
>>>I'm new in zope world. I would like to install Silva as a product in zope. 
>>>When 
>>>I put all core silva product to lib/python/Products cataloge unpack it an 
>>>restart zope again every think seems to be good 
>>
>>How did you restart your zope instance ? If you want to make sure you
>>see start-time errors, you may want to use /bin/runzope
>>instead of /bin/zopectl start.
> 
> OK. I started zope like you suggested and I didn't fnd nothik special in 
> log
> [EMAIL PROTECTED] ~]# /usr/bin/runzope
> --
> 2005-10-31T18:29:43 INFO(0) ZServer HTTP server started at Mon Oct 31 
> 18:29:43 2005
> Hostname: elunia.bibltor.torun.pl
> Port: 9080
> --
> 2005-10-31T18:29:43 INFO(0) ZServer FTP server started at Mon Oct 31 
> 18:29:43 2005
> Hostname: Elunia
> Port: 9021
> --
> 2005-10-31T18:29:43 INFO(0) ZServer HTTP server started at Mon Oct 31 
> 18:29:43 2005
> Hostname: elunia.bibltor.torun.pl
> Port: 9081
> --
> 2005-10-31T18:29:43 INFO(0) Zope Set effective user to "zope"
> --
> 2005-10-31T18:29:43 DEBUG(-200) FileStorage create storage 
> /var/lib/zope/data/Data.fs
> --
> 2005-10-31T18:29:43 DEBUG(-200) TemporaryStorage create storage session
> --
> 2005-10-31T18:29:43 BLATHER(-100) ZODB Commiting subtransaction of size 
> 6044
> /usr/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module 
> is deprecated; please use the random module
>   DeprecationWarning)
> --
> 2005-10-31T18:29:44 BLATHER(-100) Z2 Installed sighandler for SIGTERM
> --
> 2005-10-31T18:29:44 BLATHER(-100) Z2 Installed sighandler for SIGINT
> --
> 2005-10-31T18:29:44 BLATHER(-100) Z2 Installed sighandler for SIGHUP
> --
> 2005-10-31T18:29:44 BLATHER(-100) Z2 Installed sighandler for SIGUSR2
> --
> 2005-10-31T18:29:44 INFO(0) Zope Ready to handle requests
> 

Ok, seems clean...

>>>but when I want to do next step 
>>>from INSALL.txt of Silva namely on "add list" of ZMI I choose Slva root and 
>>>want to add it to zope root folder after I feed Id and Title on the "Add 
>>>Silva 
>>>Root" page and I push "Add" button I receive "HTTP 500 - Inside Error of 
>>>server 
>>>Internet Explorer". Where is an reason of this error? Any hints? 
>>
>>I'd say that some required dependencies are missing.
>>
>>To check this, you can either:
>>- have a look at /log/Z2.log

oops, sorry, I meant event.log. Z2.log is the equivalent of Apache's
acces.log. My bad :(

>>- goto Control_Panel/Products in the ZMI and check if some products are
>>'broken' (they have a special icon)
>>
> 
> Wolud you lke to mae a glance and hint me once more?

Have you checked for broken products in the Control_Panel ?

If you run in debug mode (cf /etc/zope.conf), have no
error when starting with runzope, have nothing wrong the event.log, and
have no broken product in the Control_Panel, then it must have something
to do with the phase of the moon...

Oh, BTW: what versions of Zope and Silva ?

-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] URL Rewriting chaos - error message

2005-11-01 Thread zope

Oh, I'm getting Bad Gateway from httpd served site when trying stuff.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] URL Rewriting chaos

2005-11-01 Thread zope

Hi,
I've tried everything in both the Zope and Plone books and read the Apache 
URL Rewrite guide also, but I just can't seem to get the silly thing 
working!

I'm sure that it does ;-) but for some reason it is beyond me.
Let me tell you what I've tried, and tell me which one should work:
I am using apache to rewrite the urls. 

1. Host monsters, both one in the zope root folder, and multiple in each 
plone site's folders.  I have tried both with the mappings and without (even 
though the books say they're not needed with apache). 


2. apache rewrite rules, this is how (the current attempt looks)
please assume that the big url is all on one line, email programs may have 
changed that. 



  ServerName example.net
  RewriteEngine On
  RewriteRule ^/(.*) 
http://example.net:8080/plone_site/VirtualHostBase/http/example.net:80/Virtu 
alHostRoot/$1 [L,P]
 

I have tried all combinations of things in the 'example.net' places above, 
including the fqdn, local ip number and local host name. 

Is there a shortcoming in the documentation here?  Have I accidentally 
skipped over a word somewhere that was more important than I realised? 

Please help me on this, it is the MAJOR sticking point in convincing people 
that it's a good idea for us (and them) to move to zope :-) 

Thanks in advance. 
___

Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] several questions about shared libraries and security

2005-11-01 Thread Andreas Jung



--On 1. November 2005 12:21:34 +0400 "Denis V. Gudtsov" <[EMAIL PROTECTED]> 
wrote:




Hello!

The former I wrote python library. This lib is used to interact with
database and defines some hi-level methods. I'm planing to use this lib in
scripts, running on the same machine and zope. Now library is located on
/usr/local/lib/. Is it possible to use it in zope?


The Python module must be *somewhere* in the Python search path for modules
(check the Python documentation for details, check for PYTHONPATH). In 
addition  the library referenced through your Python module must be 
somewhere in the library search path (see /etc/ld.so.conf, man 
LD_LIBRARY_PATH).




And the later i wanted to now how i can create a flexible access
rules? There are two procedures needed: authentication and
authorization. The first is not difficult to realize with "user
folder". But what is the ability to control access rights of users for
access to some types of information? I'm thinking it will about 10
users at all. Do I need to use pgUserFolder for this?



There are a bunch of options: ExUserFolder, PGUserFolder, PAS (Plugabble 
Authentication Service).


-aj






pgpgECEUQZFH8.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] several questions about shared libraries and security

2005-11-01 Thread Denis V. Gudtsov

Hello!

The former I wrote python library. This lib is used to interact with database
and defines some hi-level methods. I'm planing to use this lib in
scripts, running on the same machine and zope. Now library is located
on /usr/local/lib/. Is it possible to use it in zope?

And the later i wanted to now how i can create a flexible access
rules? There are two procedures needed: authentication and
authorization. The first is not difficult to realize with "user
folder". But what is the ability to control access rights of users for
access to some types of information? I'm thinking it will about 10
users at all. Do I need to use pgUserFolder for this?

Thank you,All! ;-)

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )