Re: [Zope] ZCatalog : Searching Multiple Indexes : Returning One Result

2008-07-09 Thread Tom Von Lahndorff
If I understand correctly, this seems like searching for multiple values in
one index. What I'm looking to do is search for one value in multiple
indexes... and get back one result even if there are True hits in more than
one index.

On Mon, Jul 7, 2008 at 4:00 PM, Jonathan <[EMAIL PROTECTED]> wrote:

>
> - Original Message ----- From: "Tom Von Lahndorff" <[EMAIL PROTECTED]>
> To: "zope list user" 
> Sent: Monday, July 07, 2008 3:42 PM
> Subject: [Zope] ZCatalog : Searching Multiple Indexes : Returning One
> Result
>
>
>
>  Hi, I have a catalog called "catalog" that contains a bunch of cataloged
>> items. I have indexed 3 properties for each item, "name", "body" and
>> "description". I'd like to be able to search the catalog in the following
>> way:
>>
>> if the word "text" shows up in any index, "name", "body" or "description",
>> return that result back once.
>>
>> The problem is I have is that if a do a search for "text" and say there's
>> results that have the word "text" in one or more of those indexes:
>>
>> catalog({name:query}) or catalog({body:query}) or
>> catalog({description:query})
>> only gives back limited results (leaves out some 'True' hits) and:
>> catalog({name:query}) + catalog({body:query}) +
>> catalog({description:query})
>> gives me back the same result 3 times.
>>
>> any ideas? Thanks.
>>
>
> Something I saved from a long time ago post (warning untested) which may
> give you some ideas:
>
> 
> context.Catalog({'keywordindex': ['Value1', 'Value2']})
> Catalog returns me an OR search instead of an AND one
>
> Use "context.Catalog(keywordindex = {'query':[...], operator='and'})"
> when you want to use the "and" operator.
> 
>
> hth
>
> Jonathan
>
>
___
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] ZCatalog : Searching Multiple Indexes : Returning One Result

2008-07-07 Thread Tom Von Lahndorff
Hi, I have a catalog called "catalog" that contains a bunch of cataloged
items. I have indexed 3 properties for each item, "name", "body" and
"description". I'd like to be able to search the catalog in the following
way:

if the word "text" shows up in any index, "name", "body" or "description",
return that result back once.

The problem is I have is that if a do a search for "text" and say there's
results that have the word "text" in one or more of those indexes:

catalog({name:query}) or catalog({body:query}) or
catalog({description:query})
only gives back limited results (leaves out some 'True' hits) and:
catalog({name:query}) + catalog({body:query}) + catalog({description:query})
gives me back the same result 3 times.

any ideas? Thanks.
___
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] statistics and click analysis for a plone site

2008-06-02 Thread Tom Von Lahndorff
Highly recommend Google Analytics:
http://www.google.com/analytics/
I've used it myself to track usage for a zope intranet which is only
accessible on an internal network.

On Mon, Jun 2, 2008 at 6:52 AM, robert rottermann <[EMAIL PROTECTED]> wrote:
> Hi there,
> for a Client using a plone2 intranet (with no access from the outside world)
> I installed awstat to track the usage of the intranet.
> now I wonder how meningfull such statisics are.
>
> The intranet usage is roughly as follows:
> - user logs into the intranet authenticating against a
> Ldap/MSActiveDirectory
> - she stays in the intranet all day, probably never logs out
> - collects data as needed
>
> The awstats setup is very basic. I just installed it and adopted the config
> files such that it finds the apache log files.
> I did a second setup for the Z2.log (to get at the old data, as we do not
> rotate the Z2.log).
>
> Looking at the awstats statistics I do not find them of overwhelming
> informative.
> Now, I now awstats is not a click analysis tool. but maybe somebody has done
> some more analysis into how to provide useful statistics on the usage of an
> intranet.
> Any pointers would be welcome.
>
> thanks
> robert
> ___
> 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 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] Re: manage_tabs.dtml (was manage_users.dtml)

2008-04-25 Thread Tom Von Lahndorff
It was using manage_tabs.dtml in /Products/ExternalEditor. Wow, that
was driving me nuts.

On Fri, Apr 25, 2008 at 4:08 PM, Tom Von Lahndorff <[EMAIL PROTECTED]> wrote:
> Sorry!!  I meant /python/App/dtml/manage_tabs.dtml
>
>  -- Forwarded message ------
>  From: Tom Von Lahndorff <[EMAIL PROTECTED]>
>  Date: Fri, Apr 25, 2008 at 4:07 PM
>  Subject: manage_users.dtml
>  To: zope list user 
>
>
>  I'm using Zope 2.10.5. Made a change to
>   /python/App/dtml/manage_users.dtml and it's not showing up after I
>   rebooted. I even removed /python/App/dtml/manage_users.dtml altogether
>   and and rebooted and the app came up fine, still not showing the
>   change. Is there another file that controls the ZMI tabs in Zope2 in
>   2.10.5. I have a couple of older version that I tested this on, 2.9.6
>   and ti worked fine. Thanks!
>
>   - Tom
>
___
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] manage_tabs.dtml (was manage_users.dtml)

2008-04-25 Thread Tom Von Lahndorff
Sorry!!  I meant /python/App/dtml/manage_tabs.dtml

-- Forwarded message --
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
Date: Fri, Apr 25, 2008 at 4:07 PM
Subject: manage_users.dtml
To: zope list user 


I'm using Zope 2.10.5. Made a change to
 /python/App/dtml/manage_users.dtml and it's not showing up after I
 rebooted. I even removed /python/App/dtml/manage_users.dtml altogether
 and and rebooted and the app came up fine, still not showing the
 change. Is there another file that controls the ZMI tabs in Zope2 in
 2.10.5. I have a couple of older version that I tested this on, 2.9.6
 and ti worked fine. Thanks!

 - Tom
___
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] manage_users.dtml

2008-04-25 Thread Tom Von Lahndorff
I'm using Zope 2.10.5. Made a change to
/python/App/dtml/manage_users.dtml and it's not showing up after I
rebooted. I even removed /python/App/dtml/manage_users.dtml altogether
and and rebooted and the app came up fine, still not showing the
change. Is there another file that controls the ZMI tabs in Zope2 in
2.10.5. I have a couple of older version that I tested this on, 2.9.6
and ti worked fine. Thanks!

- Tom
___
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] simple use case for rotating images

2008-04-16 Thread Tom Von Lahndorff
Also check out:
Google AJAX Slide Show
http://www.google.com/uds/solutions/slideshow/index.html

On Wed, Apr 16, 2008 at 12:52 PM, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
>
>
> --On 16. April 2008 09:32:38 -0700 David Bear <[EMAIL PROTECTED]> wrote:
>
>
> > We are finding that flash is used to generate simple slide shows. I'm
> > thinking it would be 'better' to use an ajax like method and zope to serve
> > up a set of standard images. Anyone know of examples? I completely new to
> > ajax and have looked at a few ajax libraries. So far they all see overkill
> > for what I want.
> >
>
> Lightbox2 is small and trivial to use:
>
> 
>
> -aj
> ___
> 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 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] anyone heard of Zamasing?

2008-04-16 Thread Tom Von Lahndorff
Thats pretty awesome. It's "zamazing" to me that Zope 2 is not a de facto
platform for "Web 2.0" projects. I think it has some major benefits over
Rails and maybe even Django but there seems to be no interest in it from
that community. This is a great start.

On Wed, Apr 16, 2008 at 6:40 AM, Peter Bengtsson <[EMAIL PROTECTED]> wrote:

> Not until now. But I'm amased! Really looking forward to taking it for a
> spin.
>
> On 16/04/2008, Chris Withers <[EMAIL PROTECTED]> wrote:
> > ...I certainly never had until someone threw a press release my way...
> >
> >  http://zamasing.com
> >
> >  Any ideas/comments/etc?
> >
> >  Chris
> >
> >  --
> >  Simplistix - Content Management, Zope & Python Consulting
> >- http://www.simplistix.co.uk
> >  ___
> >  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 )
> >
>
>
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.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 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] Conditional dtml-boundary in dtml-sendmail

2008-04-10 Thread Tom Von Lahndorff
How is dtml more "error-prone" than python? I'd imagine that all depends on
who's authoring it.


> On Wed, Apr 9, 2008 at 11:59 PM, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > --On 9. April 2008 22:40:01 +0200 Josef Meile <[EMAIL PROTECTED]>
> > wrote:
> >
> >  Dear list
> > >
> > > I'm trying to send a multi-part email after having submitted a
> > > form. In that form, the user will give some basic information
> > > from him, then he will be able to send at most three files.
> > >
> >
> > I started shivering while reading your code. We would have written such
> > code
> > five or six years ago - because we had no other choice.
> > Please use the standard 'email' module of Python...this just works
> > and you don't need to write such ugly and error-prone DTML
> > code.
> >
> > -aj
> > ___
> > 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 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] Conditional dtml-boundary in dtml-sendmail

2008-04-10 Thread Tom Von Lahndorff
The email library should be available to use with a Script (Python) and can
be done all within the ZMI. Otherwise maybe use dtml-try?

On Wed, Apr 9, 2008 at 4:40 PM, Josef Meile <[EMAIL PROTECTED]> wrote:

> Dear list
>
> I'm trying to send a multi-part email after having submitted a
> form. In that form, the user will give some basic information
> from him, then he will be able to send at most three files.
>
> This is my dtml-method to send email after having submitted the
> data:
>
>   name="REQUEST.get('aau_name_txt').encode('utf-8')"
>  lastName="REQUEST.get('aat_vorname_txt').encode('utf-8')"
>  company="REQUEST.get('aas_firma_txt').encode('utf-8')"
>  file1="REQUEST.get('aap_dateien_anhang_dat')"
>  file2="REQUEST.get('aaq_dateien_anhang_dat')"
>  file3="REQUEST.get('aar_dateien_anhang_dat')">
>
> 
> To: [EMAIL PROTECTED]
> From: &dtml-email;
> Subject: Anfrage &dtml-name; &dtml-lastName; - &dtml-company;
> Content-Type: text/html; charset=utf-8
> 
> 
>  
>Some html code comes here
>  
> 
>filename_expr="file1.filename"
> > disposition="attachment"
>   filename_expr="file2.filename"
> > disposition="attachment"
>   filename_expr="file3.filename"
> >
> 
> 
>
> Let's say that the user doesn't submit file3, on that case, zope will
> generate something like this: "some_ramdom_id.dat" and it will attach
> an empty file. I tried something like this:
>
>   type="application/octet-stream" disposition="attachment"
>  filename_expr="file1.filename"
> >
>
> However when I try to save, zope fails and says:
>
> """
> Error Type: Document Template Parse Error
> Error Value: Unexpected tag, for tag  type="application/octet-stream" disposition="attachment"
> filename_expr="file1.filename" >, on line 215 of sendAnfrage
> """
>
> The only way I found to cope with this was doing a script to validate if a
> file has whether a name or not, then I will return a dictionary like this:
> {'name': real_name_or_dummy_name, 'data': _or_dummy_text}
>
> So, I feed the boundary with a dummy file when no file was uploaded. I
> don't
> really like to send dummy files since it may confuse the person receiving
> the emails. Is there any better way of achieving this? Please note that
> since I'm working in the zmi and I'm not the administrator of the machine
> where my page is hosted, I can only use dtml to send mail :-(, thus using
> the python mail library isn't an option on this case.
>
> Best regards
> Josef
>
> ___
> 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 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] Can Zope do this...?

2008-02-08 Thread Tom Von Lahndorff


On Feb 7, 2008, at 2:19 PM, Eric Gorr wrote:

I need to create a site that works similarly to php.net...the  
problem is the same - to document a language.


From what I've seen, zope is fully capable of doing nearly  
everything I need it do, but I am uncertain about one aspect...check  
out:


http://us2.php.net/manual/en/function.fopen.php

for an example.

The aspects of this page that I like are:

1. It is not frame based

2. The left column shows a list of functions in the same category

3. The left column allows one to move up the function tree (i.e.  
^Filesystem function, ^Function Reference, etc.)


4. There is static documentation for every function (Description,  
Parameters, Return Values, etc. - I'm sure zope could handle this  
part)


5. Users are allowed to comment on the functions


Assuming that Zope can do this, how difficult would it be? Can I get  
some pointers into the Zope documentation for how to accomplish  
this? Is it worth starting with something like Plone instead of with  
'raw' zope?


Thank you.


Yes, easily. I'd go with raw zope.






___
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 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] Z2.log

2008-01-30 Thread Tom Von Lahndorff


On Jan 30, 2008, at 12:28 PM, Jens Vagelpohl wrote:



On Jan 30, 2008, at 18:17 , Tom Von Lahndorff wrote:

Can /log/Z2.log be deleted? On restart is fresh file  
created?


Yup.



Also, is max-bytes supported for logfiles in zope.conf?


What's that?


Saw it referenced here:
http://blogs.sistes.net/Garito/568


  level WARN
  #
  #  path $INSTANCE/log/Z2.log
  #  format %(message)s
  #
  
path $INSTANCE/log/Z2.log
format %(message)s
max-bytes 5MB
compression zip
backup-count 0
  





jens



___
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 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] Z2.log

2008-01-30 Thread Tom Von Lahndorff

Can /log/Z2.log be deleted? On restart is fresh file created?
Also, is max-bytes supported for logfiles in zope.conf?

Thanks, Tom
___
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] Zope ZMI Templates

2008-01-17 Thread Tom Von Lahndorff


There's nothing wrong with the ZMI. You're just try to hack into some  
kind of cms rather than just build one. Hiding a link with css is  
nasty hack and major security issue. While it may seem like what  
you're doing is an easy path to a quick cms, you're really just  
setting yourself up for a management nightmare. I'd recommend reading  
through (all of) this:


http://www.zope.org/Documentation/Books/ZopeBook


On Jan 17, 2008, at 10:17 AM, Tim Nash wrote:


Tom,
 Thanks but I think I am almost done. I have replaced the old 

Re: [Zope] Zope ZMI Templates

2008-01-17 Thread Tom Von Lahndorff


You really should be writing a custom UI for this rather than hacking  
the ZMI. It will probably take less time, be much more manageable,  
flexible and secure.


On Jan 16, 2008, at 8:05 PM, Tim Nash wrote:


The other important difference between ajax loaded pages and iframes
is that when you click on a link within an iframe page, the returned
page is loaded into the same iframe.
If I am not being clear, please check out this png file.
http://medicinebrain.com/iframe.png";>
http://medicinebrain.com/iframe.png

In this png I did a search for DML Docs within a tab panel and the
search results are loaded into the same tab.

BTW, I would like to simplify the zmi even more for my users. I want
to hide various tabs (eg. security, find, etc) and I want to restrict
the number of products they are shown in the drop down box for adding
to a folder.
However, I still want to offer complete zmi functionality to the
overall administrator.
I can probably hide the security tabs using css (the overall admin
won't load the css sheet) but how can I control the products displayed
to a user in the folder view of the zmi?

Thanks,
Tim



On Jan 16, 2008 9:54 AM, Andreas Jung <[EMAIL PROTECTED]> wrote:



--On 16. Januar 2008 09:33:58 +0100 Tino Wildenhain <[EMAIL PROTECTED] 
>

wrote:



Tim Nash wrote:

Jurian,
 While the ZMI is a bit geeky for the average user, it works quite
well inside an iframe.
iframes are used by many ajax/web2 (whatever you want to call it)
libraries. So in my application (for example) I currently make ajax
calls to load specific zmi pages inside tabs of a window layout.


IFRames. You should avoid those. With ajax or similar its easy to  
skip

such stuff and just replace any named container tag.


Iframes are still a valid choice in case asynchronous won't work  
e.g. when
you need to load resources from servers != your origin server. Due  
the
security model of asynchronous requests, a browser will only load  
stuff
from the origin server. Iframes are a way to work around this  
limitation -

ugly as you said, but sometimes a good workaround.

Ansdeas

___
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 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] Plone middle aligns all colums

2008-01-17 Thread Tom Von Lahndorff


If you've introduced tables into the overall layout tds will not align  
the content to the top by default. You'd need to add "td {vertical- 
align: top}" to your css. I doubt the problem has to do with a setting  
in Plone or Zope. It would be easier to trouble shoot this if there  
were a link to the page in question.


On Jan 16, 2008, at 9:40 PM, Lars Hohmuth wrote:

I have a weird problem with our Plone 2.5.3 test site after a new  
designer took over. Plone now middle aligns the content column and  
the portlets in the slot on the center line, instead of on top.



  

---
| Left-slots|
||center
||
---

 -

We can sort of fix this by manually adding vertical-align: top; in  
the css. But my designer claims that he caused this by “changing a  
setting in Plone or the ZMI” and doesn’t remember which one.


Since it’s not on the production site, it’s not a life and death  
situation, but any suggestions what might cause this are gratefully  
accepted. Google and the Plone site search yielded pretty much  
nothing.


Thanks,
Lars Hohmuth

___
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 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] Intercept request

2008-01-07 Thread Tom Von Lahndorff

On Jan 7, 2008, at 9:18 AM, David Chelimsky wrote:


On Jan 7, 2008 8:06 AM, Andreas Jung <[EMAIL PROTECTED]> wrote:
--On 7. Januar 2008 08:00:27 -0600 David Chelimsky <[EMAIL PROTECTED] 
>

wrote:


Hi,

I want to show different things to different viewers based on  
their IP

addresses. How can I do this?



Basically you look at the clients ip address (from the REQUEST  
object)
and perform any action you need (redirections, conditions within  
scripts,
templates)...but no idea what the sense of this usecase is. If you  
have

different audiences, setup sites with different content or something
similar. In addition: using Zope behind proxy will lead in request  
coming

from the IP address of your reverse proxy. Additional
configuration/programming is necessary to get hold of the original  
IP.


Thanks for the reply.

The use case is that my client wants to block a range of IP addresses
from being able to view their site. So I need to access the
originating IP address and filter appropriately.

I've written a few custom zope products before, but I've not done
anything that really modifies zope's behaviour on every request - just
on requests for the specific objects I'm publishing. So I'm familiar
with the request object, but I don't know how to intercept *every*
request. Are there any global request life-cycle hooks? If you can
point me to those that would be a great help.

Cheers,
David


If you just need to redirect traffic from an IP range, and not do  
anything fancy, it may be better to do it in Apache rather than Zope.

http://wiki.zope.org/zope2/ZopeAndApache

Tom



___
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 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] Intercept request

2008-01-07 Thread Tom Von Lahndorff


On Jan 7, 2008, at 9:00 AM, David Chelimsky wrote:


Hi,

I want to show different things to different viewers based on their IP
addresses. How can I do this?

Cheers,
David


swap out "theipaddress" with the actual IP.


true

true

false


Tom



___
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 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] Best Practice for including Javascript in Zope Applications

2008-01-02 Thread Tom Von Lahndorff

On Jan 1, 2008, at 7:20 PM, Matt Hollingsworth wrote:


Hello,

I’m new to developing for zope, and I have a quick question  
regarding some best practices when using Javascript in zope  
applications.


I would like to use Ext JS (http://www.extjs.com/ ) in an  
application that I am writing.  It is a fairly extensive library, so  
I didn’t really want to copy/paste every single file into a dtml  
method.  I looked all over the place for some discussion on this  
subject, but only found things relating to plone (which apparently  
has a javascript registry); however, I wish to stay away from plone  
for this particular application.


What should I do to use these libraries?  Is there a canned solution  
for this sort of thing?


Thank you much!

-Matt
___
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 )



You can ftp the files to a "static" directory on the file system and  
use LocalFS to access them.

http://wiki.zope.org/zope2/LocalFS___
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] Frustrated with Python and Frameworks. Zope, Grok, Django, CherryPy

2007-11-27 Thread Tom Von Lahndorff


Zope2 + DTML + Python and you're good to go. I know a bunch of  
developers/designers, including myself that use this combo all the  
time. I currently use it for projects at a Fortune 500 company. The  
docs suck but once you get in the groove you can bang out solid,  
stable, good looking, standard compliant sites unbelievably fast.  
Acquisition can be your best friend and you reuse a lot of your coding  
for multiple projects. There are still developers on this list who use  
DTML over ZPT, they just dont post much to it because of the ZPT  
backlash you get when you do. I've gotten private messages off this  
list from people though about DTML so there is support out there. Its  
true that most of the products for Zope 2 have been updated in a while  
but I can tell you that most will work fine with the latest Zope 2  
release and are very customizable. The Zope2 ecosystem is pretty  
mature and stable just poorly documented or supported. I do think  
you'll probably get the "Zope Zen" quicker than you think and be able  
to figure out a lot on your own.


On Nov 26, 2007, at 8:18 PM, Rene B wrote:

I'm frustrated trying to select a python web framework. I’ve  
researched quite a
few. CherryPy,Karrigell,Zope 2,3,Grok, Gluon,Django,Mod_Python. I’ve  
also

looked at templating languages like Spyce, and Cheetah.
I’m beginning to think there’s nothing  out there  for a newbie python
programmer like myself.  I’m a Network Admin  that likes programming  
but

doesn’t have the time to get really proficient at it.
I selected Python as a language of choice and that’s all I’ve used.   
I’ve

written a  few scripts .
I’m interested in building dynamic web sites but I tell you  it’s  
impossible to

select a tool.
I’ve researched all the tools mentioned above.  The most important  
thing in my
decision is that I know some Python and want to use it to build the  
dynamic
site. I don’t want to learn a new language to do that. ZPT is a new  
language.
Its not python.  Not even close.  Out of all the ones I’ve  
researched I like
Zope 2 the best.  Not sure why. I want some thing easy.  I like  
DTML. It’s
easy. I know why ZPT has it’s advantages but for ease of use it  
doesn’t come
close to DTML. Most people like me wont  be building complex web  
sites and  I’d
be the only working on it meaning I’ll do the HTML layout and code  
the dynamic
portions of it. So I don’t’ need to worry about  an HTML editor  
getting

confused with the dynamic languages  mixed in blah blah  blah.

I’m afraid to learn Zope 2 because I have no idea what direction  
it’s going in.
Not to mention I don’t particularly like ZPT. I’ve read DTML isn’t  
going
anywhere but I don’t imagine I’ll get much support  on it when  
needed and I’m

sure people will be telling me to use ZPT cause DTML is dead.
Funny, I read something while reading news about Grok’s new plugins  
for any
template language . They used Genshi as an example and talked about  
template
languages and which one is better etc.. The bottom line was "use the  
one that
you like".  So I wish people would stop putting down DTML or others  
over the
one they prefer and continue to help those regardless of which they  
choose.
Back to trying to choose. I think Django is too hard.  I like  
Mod_python with
PSP. PSP seems to be more python like then anything I’ve seen. Yet  
Mod_Python

has terrible docs for people like me and it doesn't seem to popular.
The other frameworks have some good ideas. I like Karrigell but you  
just don’t
know how long it will be supported.Gluon is cool but its new.  Zope  
3 is out of
the question. Grok looks to me like  another CherryPy. It may be  
easier the
Zope 3 but it’s not easier then Zope 2. Plus I’ve yet to get it  
installed on my

windows XP to play.
I like cheetah as a tool. There docs are not that great and not many  
examples.
Plus no auto generated content  like you get in Zope 2.  Yes some  
magic is
good. The CRUD is what made Rails over rated to start out  
with.People like some
magic. saves time.  Combining Cheetah and Zope sounds interesting to  
me.
So what do I do. I like Zope 2. I can’t find any books on it  
released after

2002. Plone is tooo much.
There aren’t any new products out for Zope 2 and the ones that are  
there

haven’t been touched for years.
Zope 2 wiki seems dead.  I was looking the other day for some type  
of  auto
CRUD for Zope 2. couldn’t find  anyting. No one seems to be adding  
anything new

to Zope 2 which scares me the most.
If I take the time to learn a tool I want to make sure it’s going to  
be around
for awhile and have good support and new addons  being added all of  
the time to

help me.


___
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] Zope Jobs

2007-11-06 Thread Tom Von Lahndorff


Anyone have any recommendations for a good place to post a Zope job?  
Its for a freelance, work from where ever gig. Thanks.


Tom
___
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] WYSIWYG editors? (was: SOAPMethod)

2007-09-04 Thread Tom Von Lahndorff


really? It looks like the number one argument for using ZPT is  
because it's compatible with "DreamReaper" and "GoDeath".

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx

If people use it for other reasons, great. I think WSYSIWYG editors  
are total crap for many reasons so Im with you on that one. I guess  
the problem is that rarely does anyone point a reason that someone  
should use TAL over DTML so I think my assumption is fair based on  
available documentation. Whenever someone posts something about DTML  
(which is not being deprecated, is not slower as far as I know and  
does have some benefits over TAL depending on what you're doing) they  
mostly get a comment like "Use TAL, not DTML". Why? Frankly, I dont  
care how people choose to develop their products, there's benefits  
and drawbacks to both TAL and DTML but I would tell someone to try  
both and decide and not just tell them to use what I prefer.


On Sep 4, 2007, at 3:32 PM, Sascha Welter wrote:

(Mon, Sep 03, 2007 at 12:10:13PM -0400) Tom Von Lahndorff wrote/ 
schrieb/egrapse:

...People on this list though will always recommend
TAL because they are mostly developers who use WYSIWYG html editors.


Tom,

whatever you might say about DTML vs. Page Templates, *this*  
sentence of
yours is just bullsh... Do you think any of the Zope devs sit  
around and

design their stuff in DreamReaper or GoDeath? You must be joking.

People on this list recommend TAL for various reasons, but none of  
them

have anything to do with them using point-and-click "webdesign"
programs.

Regards,

Sascha

___
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 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] Stripping Quotes

2007-09-04 Thread Tom Von Lahndorff


doesn't work. the double quotes are not escaped and zope sees them as  
the end of the expression.


> From: "Jaroslav Lukesh" <[EMAIL PROTECTED]>
> Date: August 29, 2007 6:16:12 PM EDT
> To: "Zope user list" , "Tom Von Lahndorff"
> <[EMAIL PROTECTED]>
> Subject: Re: [Zope] Stripping Quotes
>
>  ('\'','')">
>
>
> - Original Message - From: "Tom Von Lahndorff"
> <[EMAIL PROTECTED]>
>
>
>> Whats the best way to strip (double and/or single) quotes from a
>> string in python and/or dtml? Thanks.___
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] SOAPMethod

2007-09-04 Thread Tom Von Lahndorff
See Johnathan's comment. It sounds like an html/css issue. If it  
renders in the source its working.


On Sep 4, 2007, at 4:48 AM, Mark Baldry wrote:


Hi Tom

to be honest i would much rather use DTML as i understand this but  
it doesn't
seem to work it only returns the result of the SOAP query when i  
view the
source code. The SOAPMethod product recommends DTML but I have  
followed the

example they give and this is what is happening.

Mark

On Monday 03 September 2007 17:32, Jonathan wrote:

- Original Message -----
From: "Tom Von Lahndorff" <[EMAIL PROTECTED]>
To: "robert rottermann" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, September 03, 2007 12:10 PM
Subject: Re: [Zope] SOAPMethod


Hi Mark,

There's nothing wrong with using DTML instead of TAL. each have  
their
drawbacks and benefits and it really comes down to user choice  
and  job

requirements. People on this list though will always recommend  TAL
because they are mostly developers who use WYSIWYG html editors.   
If you
hand code your design markup dtml can be much cleaner, require   
less code

and avoid annoying problems with javascript.

Tom


+1   ;-)


Jonathan


On Sep 3, 2007, at 10:10 AM, robert rottermann wrote:

Mark Baldry schrieb:
I need to get some information from a database and display it  
on  our

website.
It's a very simple query just passing one number to get the   
record.

The only
way i am allowed to query this database is via SOAP.

I have installed the SOAPMethod and have got it working but i   
cannot

get the
result to display. I can only view the result when i look at the
source of
the page.

the dtml Method i am using is written -



this is what the help that came with the product says to use.

(requestStudentData is the name of the SOAPMethod and "5506239"  
is  the

query
string i am passing to the database.)


you better do not use dtml but tal (aka page templates). to  
learn  about

it go to the zope site and look up the zope book (take the one on
plope.org)

it would look something like:

  
The title
  
  

Some information on student 5506239


  



HTH
robert

___
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 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 )



--
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.485 / Virus Database:
269.13.3/986 - Release Date: 9/3/2007 9:31 AM


___
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 )


--
Mark Baldry
IT support
Union of UEA Students
t:  01603 592503
e:  [EMAIL PROTECTED]
___
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 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] SOAPMethod

2007-09-03 Thread Tom Von Lahndorff


Hi Mark,

There's nothing wrong with using DTML instead of TAL. each have their  
drawbacks and benefits and it really comes down to user choice and  
job requirements. People on this list though will always recommend  
TAL because they are mostly developers who use WYSIWYG html editors.  
If you hand code your design markup dtml can be much cleaner, require  
less code and avoid annoying problems with javascript.


Tom

On Sep 3, 2007, at 10:10 AM, robert rottermann wrote:


Mark Baldry schrieb:
I need to get some information from a database and display it on  
our website.
It's a very simple query just passing one number to get the  
record. The only

way i am allowed to query this database is via SOAP.

I have installed the SOAPMethod and have got it working but i  
cannot get the
result to display. I can only view the result when i look at the  
source of

the page.

the dtml Method i am using is written -



this is what the help that came with the product says to use.

(requestStudentData is the name of the SOAPMethod and "5506239" is  
the query

string i am passing to the database.)


you better do not use dtml but tal (aka page templates). to learn  
about
it go to the zope site and look up the zope book (take the one on  
plope.org)


it would look something like:

  
The title
  
  

Some information on student 5506239


  



HTH
robert

___
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 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] Stripping Quotes

2007-08-29 Thread Tom Von Lahndorff


Whats the best way to strip (double and/or single) quotes from a  
string in python and/or dtml? Thanks.

___
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] Can t start Zope

2007-08-28 Thread Tom Von Lahndorff


This is in the error log:

-08-20T15:12:21 ERROR root Exception while rendering an error message
Traceback (most recent call last):
  File "/opt/zope/Zope-2.10.1_Software/lib/python/OFS/ 
SimpleItem.py", line 225, in raise_standardErrorMessage

v = s(client, REQUEST, **kwargs)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/OFS/ 
DTMLMethod.py", line 143, in __call__

r=apply(HTML.__call__, (self, client, REQUEST), kw)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/DocumentTemplate/ 
DT_String.py", line 476, in __call__

try: result = render_blocks(self._v_blocks, md)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/OFS/ 
DTMLMethod.py", line 136, in __call__

r=apply(HTML.__call__, (self, client, REQUEST), kw)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/DocumentTemplate/ 
DT_String.py", line 476, in __call__

try: result = render_blocks(self._v_blocks, md)
Unauthorized: You are not allowed to access 'admin' in this context

Any ideas?

On Aug 28, 2007, at 12:37 PM, Andreas Jung wrote:




--On 28. August 2007 12:32:42 -0400 Tom Von Lahndorff  
<[EMAIL PROTECTED]> wrote:

 import AccessControl.Role, AccessControl.Owned, App.Common
ImportError: No module named AccessControl.Role


Broken installation? And why Zope 2.10.1? We are currently at 2.10.4.

Andreas


___
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] Can't start Zope

2007-08-28 Thread Tom Von Lahndorff


Getting the following error. Thanks in advance.

]# ./zopectl start
Traceback (most recent call last):
  File "/opt/zope/Zope-2.10.1_Software/lib/python/Zope2/Startup/ 
zopectl.py", line 322, in ?

main()
  File "/opt/zope/Zope-2.10.1_Software/lib/python/Zope2/Startup/ 
zopectl.py", line 280, in main

options.realize(args)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/Zope2/Startup/ 
zopectl.py", line 91, in realize

ZDOptions.realize(self, *args, **kw)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/zdaemon/ 
zdoptions.py", line 273, in realize

self.load_schema()
  File "/opt/zope/Zope-2.10.1_Software/lib/python/zdaemon/ 
zdoptions.py", line 321, in load_schema

self.schema = ZConfig.loadSchema(self.schemafile)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
loader.py", line 31, in loadSchema

return SchemaLoader().loadURL(url)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
loader.py", line 65, in loadURL

return self.loadResource(r)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
loader.py", line 159, in loadResource

schema = ZConfig.schema.parseResource(resource, self)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
schema.py", line 27, in parseResource

xml.sax.parse(resource.file, parser)
  File "/usr/local/lib/python2.4/xml/sax/__init__.py", line 33, in  
parse

parser.parse(source)
  File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107,  
in parse

xmlreader.IncrementalParser.parse(self, source)
  File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in  
parse

self.feed(buffer)
  File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 207,  
in feed

self._parser.Parse(data, isFinal)
  File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 300,  
in start_element

self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
schema.py", line 99, in startElement

getattr(self, "start_" + name)(attrs)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
schema.py", line 475, in start_schema

keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
schema.py", line 201, in get_sect_typeinfo

datatype = self.get_datatype(attrs, "datatype", "null", base)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
schema.py", line 194, in get_datatype

return self._registry.get(dtname)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
datatypes.py", line 398, in get

t = self.search(name)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/ZConfig/ 
datatypes.py", line 423, in search

package = __import__(n, g, g, component)
  File "/opt/zope/Zope-2.10.1_Software/lib/python/Zope2/Startup/ 
datatypes.py", line 21, in ?

import OFS.Uninstalled
  File "/opt/zope/Zope-2.10.1_Software/lib/python/OFS/ 
Uninstalled.py", line 16, in ?

import  SimpleItem, Globals, Acquisition
  File "/opt/zope/Zope-2.10.1_Software/lib/python/OFS/ 
SimpleItem.py", line 26, in ?

import AccessControl.Role, AccessControl.Owned, App.Common
ImportError: No module named AccessControl.Role
___
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] Form-Through-Script

2007-08-13 Thread Tom Von Lahndorff
or maybe you have an "update" page where you remove items and then a  
"confirm" page where you can send to PP?


On Aug 13, 2007, at 5:14 PM, [EMAIL PROTECTED] wrote:


I'm trying to make a silk purse out of a pig's ear :)
I have a form where purchasers can deselect items they've added to  
their shopping cart. All the hidden fields have been numbered  
according to the items they *originally* selected. If they deselect  
an item, then it will probably necessitate a renumbering of all  
those hidden fields, since PayPal doesn't tolerate misnumbering:  
everything must be numbered "1" for all the hidden fields of the  
first product, "2" for the second, etc. If the customer selects 5  
products and deletes the 3rd, then I need to renumber. I wrote a  
script that can do that. Now, I have to send the form to that  
script, with all its lovely hidden fields, then reproduce it  
somewhere so I can send it off to PP. That is, the form must return  
from the called script to a new page and deliver all the renumbered  
hidden fields.

TIA,
Tony


-Original Message-
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 4:59 pm
Subject: Re: [Zope] Form-Through-Script

can you describe what you're trying to do a little more clearly?

On Aug 13, 2007, at 4:29 PM, [EMAIL PROTECTED] wrote:


Well it didn't like that, either:

Invalid request
The parameter, doc, was omitted from the request.

again. But look here:


enctype="multipart/form-data">



See, I have a definition of "docs", but it's not pointing to a  
"use-macro" widget. Must be the problem, but how do I do that?

TIA,
Tony

-Original Message-
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 4:20 pm
Subject: Re: [Zope] Form-Through-Script


I think you want:

method="post" enctype="multipart/form-data">


http://example.com/s/renumberTheCart"; method="post">





(my tal may be a bit off)


On Aug 13, 2007, at 4:09 PM, [EMAIL PROTECTED] wrote:

No, it should work the way it is...that is a URL I passed. I  
changed it to an absolute URL just to double-check, and got  
basically the same error:


Invalid request
The parameter, doc, was omitted from the request.

How do I pass the parameter, which in my case is quite long and  
stashed neatly away in a PT macro?



http://example.com/s/renumberTheCart?doc=docs";  
method="post">




TIA,
Tony

-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 3:55 pm
Subject: Re: [Zope] Form-Through-Script


--On 13. August 2007 15:39:40 -0400 [EMAIL PROTECTED] wrote:

>
> Hi;
> I have a form that I need to send to a script and then send off  
to a URL
> (PayPal). I need to process it through the script to renumber  
things for
> PP. How do I do this? I imagine I add an element to the PT like  
so:

>
> method="post">

>
> but I need to pass a parameter "doc", which, of course, is the  
document

> I'm submitting. So I tried this:
>
> method="post">

> 

You might check out the basics about HTML forms first. The  
'action' parameter is an URL and *not* some Python-like function  
call. You specify the destination URL inside the action attribute  
and pass the parameters as *hidden* form parameters to the URL -  
either using method GET or POST.


You'll find more on forms in any HTML tutorial. Start from here:

<http://www.w3schools.com/html/html_forms.asp>

-aj
AOL now offers free email to everyone. Find out more about what's  
free from AOL at AOL.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 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] Form-Through-Script

2007-08-13 Thread Tom Von Lahndorff


Sounds like the script should check to see if the user is removing  
something like:



if remove
remove the item
redirect back to the udpated form page
else
send to PP

this way once the item is removed and the same script is called,  
since there's no remove this time, it'll go to PP.


On Aug 13, 2007, at 5:14 PM, [EMAIL PROTECTED] wrote:


I'm trying to make a silk purse out of a pig's ear :)
I have a form where purchasers can deselect items they've added to  
their shopping cart. All the hidden fields have been numbered  
according to the items they *originally* selected. If they deselect  
an item, then it will probably necessitate a renumbering of all  
those hidden fields, since PayPal doesn't tolerate misnumbering:  
everything must be numbered "1" for all the hidden fields of the  
first product, "2" for the second, etc. If the customer selects 5  
products and deletes the 3rd, then I need to renumber. I wrote a  
script that can do that. Now, I have to send the form to that  
script, with all its lovely hidden fields, then reproduce it  
somewhere so I can send it off to PP. That is, the form must return  
from the called script to a new page and deliver all the renumbered  
hidden fields.

TIA,
Tony


-Original Message-
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 4:59 pm
Subject: Re: [Zope] Form-Through-Script

can you describe what you're trying to do a little more clearly?

On Aug 13, 2007, at 4:29 PM, [EMAIL PROTECTED] wrote:


Well it didn't like that, either:

Invalid request
The parameter, doc, was omitted from the request.

again. But look here:


enctype="multipart/form-data">



See, I have a definition of "docs", but it's not pointing to a  
"use-macro" widget. Must be the problem, but how do I do that?

TIA,
Tony

-Original Message-
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 4:20 pm
Subject: Re: [Zope] Form-Through-Script


I think you want:

method="post" enctype="multipart/form-data">


http://example.com/s/renumberTheCart"; method="post">





(my tal may be a bit off)


On Aug 13, 2007, at 4:09 PM, [EMAIL PROTECTED] wrote:

No, it should work the way it is...that is a URL I passed. I  
changed it to an absolute URL just to double-check, and got  
basically the same error:


Invalid request
The parameter, doc, was omitted from the request.

How do I pass the parameter, which in my case is quite long and  
stashed neatly away in a PT macro?



http://example.com/s/renumberTheCart?doc=docs";  
method="post">




TIA,
Tony

-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 3:55 pm
Subject: Re: [Zope] Form-Through-Script


--On 13. August 2007 15:39:40 -0400 [EMAIL PROTECTED] wrote:

>
> Hi;
> I have a form that I need to send to a script and then send off  
to a URL
> (PayPal). I need to process it through the script to renumber  
things for
> PP. How do I do this? I imagine I add an element to the PT like  
so:

>
> method="post">

>
> but I need to pass a parameter "doc", which, of course, is the  
document

> I'm submitting. So I tried this:
>
> method="post">

> 

You might check out the basics about HTML forms first. The  
'action' parameter is an URL and *not* some Python-like function  
call. You specify the destination URL inside the action attribute  
and pass the parameters as *hidden* form parameters to the URL -  
either using method GET or POST.


You'll find more on forms in any HTML tutorial. Start from here:

<http://www.w3schools.com/html/html_forms.asp>

-aj
AOL now offers free email to everyone. Find out more about what's  
free from AOL at AOL.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 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] Form-Through-Script

2007-08-13 Thread Tom Von Lahndorff

can you describe what you're trying to do a little more clearly?

On Aug 13, 2007, at 4:29 PM, [EMAIL PROTECTED] wrote:


Well it didn't like that, either:

Invalid request
The parameter, doc, was omitted from the request.

again. But look here:


enctype="multipart/form-data">



See, I have a definition of "docs", but it's not pointing to a "use- 
macro" widget. Must be the problem, but how do I do that?

TIA,
Tony

-----Original Message-
From: Tom Von Lahndorff <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 4:20 pm
Subject: Re: [Zope] Form-Through-Script


I think you want:

method="post" enctype="multipart/form-data">


http://example.com/s/renumberTheCart"; method="post">





(my tal may be a bit off)


On Aug 13, 2007, at 4:09 PM, [EMAIL PROTECTED] wrote:

No, it should work the way it is...that is a URL I passed. I  
changed it to an absolute URL just to double-check, and got  
basically the same error:


Invalid request
The parameter, doc, was omitted from the request.

How do I pass the parameter, which in my case is quite long and  
stashed neatly away in a PT macro?



http://example.com/s/renumberTheCart?doc=docs";  
method="post">




TIA,
Tony

-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 3:55 pm
Subject: Re: [Zope] Form-Through-Script


--On 13. August 2007 15:39:40 -0400 [EMAIL PROTECTED] wrote:

>
> Hi;
> I have a form that I need to send to a script and then send off  
to a URL
> (PayPal). I need to process it through the script to renumber  
things for

> PP. How do I do this? I imagine I add an element to the PT like so:
>
> method="post">

>
> but I need to pass a parameter "doc", which, of course, is the  
document

> I'm submitting. So I tried this:
>
> method="post">

> 

You might check out the basics about HTML forms first. The  
'action' parameter is an URL and *not* some Python-like function  
call. You specify the destination URL inside the action attribute  
and pass the parameters as *hidden* form parameters to the URL -  
either using method GET or POST.


You'll find more on forms in any HTML tutorial. Start from here:

<http://www.w3schools.com/html/html_forms.asp>

-aj
AOL now offers free email to everyone. Find out more about what's  
free from AOL at AOL.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 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] Form-Through-Script

2007-08-13 Thread Tom Von Lahndorff


I think you want:

method="post" enctype="multipart/form-data">


http://example.com/s/renumberTheCart"; method="post">





(my tal may be a bit off)


On Aug 13, 2007, at 4:09 PM, [EMAIL PROTECTED] wrote:

No, it should work the way it is...that is a URL I passed. I  
changed it to an absolute URL just to double-check, and got  
basically the same error:


Invalid request
The parameter, doc, was omitted from the request.

How do I pass the parameter, which in my case is quite long and  
stashed neatly away in a PT macro?



http://example.com/s/renumberTheCart?doc=docs";  
method="post">




TIA,
Tony

-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 13 Aug 2007 3:55 pm
Subject: Re: [Zope] Form-Through-Script


--On 13. August 2007 15:39:40 -0400 [EMAIL PROTECTED] wrote:

>
> Hi;
> I have a form that I need to send to a script and then send off  
to a URL
> (PayPal). I need to process it through the script to renumber  
things for

> PP. How do I do this? I imagine I add an element to the PT like so:
>
> method="post">

>
> but I need to pass a parameter "doc", which, of course, is the  
document

> I'm submitting. So I tried this:
>
> method="post">

> 

You might check out the basics about HTML forms first. The 'action'  
parameter is an URL and *not* some Python-like function call. You  
specify the destination URL inside the action attribute and pass  
the parameters as *hidden* form parameters to the URL - either  
using method GET or POST.


You'll find more on forms in any HTML tutorial. Start from here:



-aj
AOL now offers free email to everyone. Find out more about what's  
free from AOL at AOL.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 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] Form-Through-Script

2007-08-13 Thread Tom Von Lahndorff

On Aug 13, 2007, at 3:55 PM, Andreas Jung wrote:




--On 13. August 2007 15:39:40 -0400 [EMAIL PROTECTED] wrote:



Hi;
I have a form that I need to send to a script and then send off to  
a URL
(PayPal). I need to process it through the script to renumber  
things for

PP. How do I do this? I imagine I add an element to the PT like so:

method="post">


but I need to pass a parameter "doc", which, of course, is the  
document

I'm submitting. So I tried this:

method="post">




You might check out the basics about HTML forms first. The 'action'  
parameter is an URL and *not* some Python-like function call. You  
specify the destination URL inside the action attribute and pass  
the parameters as *hidden* form parameters to the URL - either  
using method GET or POST.


You'll find more on forms in any HTML tutorial. Start from here:





If you're uploading a file you'll want to also add enctype="multipart/ 
form-data" to the form tag. I usually add it by default.


http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4
"The content type "application/x-www-form-urlencoded" is inefficient  
for sending large quantities of binary data or text containing non- 
ASCII characters. The content type "multipart/form-data" should be  
used for submitting forms that contain files, non-ASCII data, and  
binary data."




-aj
___
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 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] Logon process

2007-07-05 Thread Tom Von Lahndorff


Not sure if it's exactly what you're looking for but you may want to  
check out the Cookie Crumbler product.

http://packages.debian.org/stable/source/zope-cookiecrumbler

On Jul 5, 2007, at 2:41 AM, Garito wrote:


Hi all!
I've developed a site that if you are not logged in renders in a  
way but if you are logged in renders in another way (with more  
functionality)


I would like to create a logon form and the validate the user in an  
AJAX way


Where can I read about it? Or where the acl_users code is located?

I would like to avoid the use of alternatives acl_users products if  
possible because I would like to store users on the ZODB normaly as  
original acl_users object do (I don't need ExUserFolder or similar  
if possible)


Thanks!

--
Mis Cosas
http://blogs.sistes.net/Garito
___
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 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] Mac OS X Server StartupItem for Zope

2007-06-28 Thread Tom Von Lahndorff


I've used Automator to create an app that I have as a startup item  
which restarts Zope on reboot. You could also use iCal for scheduling.


In Automator choose "Automator" under "Library" and then "Run Shell  
Script" and type in your script, save that as an Application then add  
it to your startup items.



On Jun 28, 2007, at 5:09 PM, cristopher pierson ewing wrote:


Hello,

I'm trying to get a startup item set up under OS X Server 10.4 on  
an Intel XServe box.  I'd like not to have to manually restart Zope  
every time a software update forces me to restart the machine.   
I've gotten the following written up, but it failed to run for some  
unspecified reason.


Here's the plist:

{
  Description = "Zope Application Server";
  Provides= ("Application Server");
  Uses= ("Disks", "NFS");
}

And the startup script:

#!/bin/sh

##
# Zope Application Server
##

. /etc/rc.common

ZOPE_APP_BASE=/path/to/zope/instances; export ZOPE_APP_BASE

StartService ()
{
ConsoleMessage "Starting Zope Application Server"
${ZOPE_APP_BASE}/mysite1/zopectl start
${ZOPE_APP_BASE}/mysite2/zopectl start
}

StopService ()
{
ConsoleMessage "Stopping Zope Application Server"
${ZOPE_APP_BASE}/mysite1/zopectl stop
${ZOPE_APP_BASE}/mysite2/zopectl stop
}

RestartService ()
{
ConsoleMessage "Stopping Zope Application Server"
${ZOPE_APP_BASE}/mysite1/zopectl restart
${ZOPE_APP_BASE}/mysite2/zopectl restart
}

I have multiple zope instances running, and need to start them all,  
and this is my attempt, but it doesn't work.


Anyone out there have a successful StartupItem script that I could  
model mine after?  Alternatively, anyone have any debugging  
experience on StartupItems and could point me at how to figure out  
more than 'it failed' (which is all the system log tells me)?


thanks in advance for any advice you all might have!

Cris


Cris Ewing
CME and Telehealth Web Services
Department of Radiology Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: [EMAIL PROTECTED]
***


___
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 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] Zope products that allows people to Add Comments to publications

2007-06-27 Thread Tom Von Lahndorff


I've been using it for years without issue. Very easy to set up and  
configure. Currently have it running in a 2.9 *and* 2.10 instance.


On Jun 27, 2007, at 10:19 AM, Chris Withers wrote:


Andreas Jung wrote:

Forget Squishdot, it's unmaintained since 4 years.


Urm, excuse me, but that's just plain lies.

I actively maintain Squishdot.

The svn trunk works fine in Zope 2.9 and should be fine in Zope 2.10.

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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 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] Zope products that allows people to Add Comments to publications

2007-06-25 Thread Tom Von Lahndorff


check out http://www.squishdot.org

On Jun 25, 2007, at 3:00 PM, kamal hamzat wrote:


Hello,

Is there any zope product that allows visitors to Add Comments to  
the news / articles, just like the one in plone.


Thanks
___
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 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] RSS to HTML in Zope

2007-06-18 Thread Tom Von Lahndorff
Hi, Im still struggling to get an RSS feed converted to HTML in Zope  
using


Universal Feed Parser
http://www.feedparser.org/
+
This feedpaser setup
http://www.zope.org/Members/johntynan/feedparser

I'm able to get an RSS feed converted to what looks like a dictionary  
and view it, however it shows up as a rendered string on the page.  
Whenever I try to get any of the keys, no matter how, I've tried  
every possible scenario, I get an error back every time. "Blah Blah"  
is not callable..., You care not allowed to access "blah Blah" in  
this context., Value 0, etc...


I've also tried using the RSS Document in the XML Kit which ended up  
causing a runaway python method and took down Zope so I'd like to  
avoid using it. Half the time it gives back an error message anyway.


If anyone has a relatively easy way to convert an RSS feed to HTML in  
Zope I would greatly appreciate any feedback on how to set this up.  
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] Dictionary Key Error from Parsed RSS

2007-06-15 Thread Tom Von Lahndorff

Here's a snippet of the rendered RSS feed:

{'feed': {'subtitle': u'', 'links': [{'href': u'http:// 
www.modscape.com/blog', 'type': 'text/html', 'rel': 'alternate'}],  
'title': u'modscape.com Home', 'subtitle_detail': {'base': 'http:// 
www.modscape.com/blog/rss.xml', 'type': 'text/html', 'value': u'',  
'language': None}, 'title_detail': {'base': 'http://www.modscape.com/ 
blog/rss.xml', 'type': 'text/plain', 'value': u'modscape.com Home',  
'language': None}, 'link': u'http://www.modscape.com/blog'},  
'status': 200, 'updated': (2007, 6, 15, 16, 48, 28, 4, 166, 0),  
'version': 'rss20', 'encoding': 'iso-8859-15', 'bozo': 0, 'headers':  
{'content-length': '18486', 'via': '1.0 px04.bc.fw.cbs.net:80  
(squid)', 'x-cache': 'MISS from px04.bc.fw.cbs.net', 'x-powered-by':  
'Zope (www.zope.org), Python (www.python.org)', 'x-cache-lookup':  
'HIT from px04.bc.fw.cbs.net:80', 'expires': 'Fri, 15 Jun 2007  
17:48:28 GMT', 'server': 'Apache/2.0.52 (Red Hat) DAV/2 SVN/1.2.3  
mod_ssl/2.0.52 OpenSSL/0.9.7a PHP/5.1.2 mod_fastcgi/2.4.2', 'last- 
modified': 'Fri, 15 Jun 2007 16:48:28 GMT', 'connection': 'close',  
'cache-control': 'max-age=3600', 'date': 'Fri, 15 Jun 2007 16:48:28  
GMT', 'content-type': 'text/xml; charset=iso-8859-15'}, 'etag': None,  
'href': 'http://www.modscape.com/blog/rss.xml', 'namespaces': {},  
'entries': [{'updated': u'Mon, Sep 04 2006, 06:23PM',  
'updated_parsed': None, 'links': [{'href': u'http://www.modscape.com/ 
blog/index_html?showall=yes#id1157412223', 'type': 'text/html',  
'rel': 'alternate'}], 'title': u'Ubuntu: Linux For Human Beings',  
'summary_detail': {'base': 'http://www.modscape.com/blog/rss.xml',  
'type': 'text/html', 'value': u'http://www.modscape.com/ 
blog/1157412223/ubuntu.jpg" width="150" alt="ubuntu.jpg"  
align="right" hspace="10" />\n\nTom wrote:\n\nhref="http://www.ubuntu.com/";>Ubuntu is an easy


On Jun 15, 2007, at 12:17 PM, Andreas Jung wrote:

No idea what this method should tell use?! Your code uses  
"news.feed.href"...nothing's like that can be found here in the code.

We can not guess what this snippet is doing and where and why.

-aj

--On 15. Juni 2007 12:02:48 -0400 Tom Von Lahndorff  
<[EMAIL PROTECTED]> wrote:



shouldnt this prevent that?

def dictify(p):
 """
 Since the FeedParser returns a dictionary-like class instance,
rather than
 a real dictionary, We must iterate through all nested  
instances and

convert
 them to dicts to avoid security problems within Zope. I have  
no idea

*why*
 feedparser doesn't just use real nested dicts in the first  
place.

 """
 newdict = {}
 if type(p) in [types.DictionaryType, types.InstanceType]:
 d = p # for clarity
 for k,v in d.items():
 newdict[k] = dictify(v)
 elif type(p) == types.ListType:
 l = p # for clarity
 for ss,v in zip(xrange(len(l)), l):
 l[ss] = dictify(v)
 return l
 else: return p
 return newdict


On Jun 15, 2007, at 11:49 AM, Andreas Jung wrote:




--On 15. Juni 2007 11:45:49 -0400 Tom Von Lahndorff
<[EMAIL PROTECTED]> wrote:


http://www.modscape.com/blog/
rss.xml')">





gives:

Site Error

An error was encountered while publishing this resource.

Error Type: Unauthorized
Error Value: You are not allowed to access 'feed' in this context



Likely because the module has no security assertions. All your
stuff runs
under the conditions of Restricted Python. The standard Zope
security applies.

-aj




--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
-- 
--

E-Publishing, Python, Zope & Plone development, Consulting


___
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] Dictionary Key Error from Parsed RSS

2007-06-15 Thread Tom Von Lahndorff

shouldnt this prevent that?

def dictify(p):
"""
Since the FeedParser returns a dictionary-like class instance,  
rather than
a real dictionary, We must iterate through all nested instances  
and convert
them to dicts to avoid security problems within Zope. I have no  
idea *why*

feedparser doesn't just use real nested dicts in the first place.
"""
newdict = {}
if type(p) in [types.DictionaryType, types.InstanceType]:
d = p # for clarity
for k,v in d.items():
newdict[k] = dictify(v)
elif type(p) == types.ListType:
l = p # for clarity
for ss,v in zip(xrange(len(l)), l):
l[ss] = dictify(v)
return l
else: return p
return newdict


On Jun 15, 2007, at 11:49 AM, Andreas Jung wrote:




--On 15. Juni 2007 11:45:49 -0400 Tom Von Lahndorff  
<[EMAIL PROTECTED]> wrote:


http://www.modscape.com/blog/ 
rss.xml')">






gives:

Site Error

An error was encountered while publishing this resource.

Error Type: Unauthorized
Error Value: You are not allowed to access 'feed' in this context



Likely because the module has no security assertions. All your  
stuff runs
under the conditions of Restricted Python. The standard Zope  
security applies.


-aj


___
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] Dictionary Key Error from Parsed RSS

2007-06-15 Thread Tom Von Lahndorff
http://www.modscape.com/blog/ 
rss.xml')">






gives:

Site Error

An error was encountered while publishing this resource.

Error Type: Unauthorized
Error Value: You are not allowed to access 'feed' in this context

Troubleshooting Suggestions

* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an  
error.


For more detailed information about the error, please refer to the  
error log.


If the error persists please contact the site maintainer. Thank you  
for your patience.


Traceback (innermost last):

* Module ZPublisher.Publish, line 115, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 41, in call_object
* Module OFS.DTMLMethod, line 144, in __call__
  
  URL: http://localhost:8080/feeds/nprnews.html/manage_main
  Physical Path:/feeds/nprnews.html
* Module DocumentTemplate.DT_String, line 476, in __call__
* Module DocumentTemplate.DT_Let, line 76, in render
* Module DocumentTemplate.DT_Util, line 196, in eval
  __traceback_info__: news
* Module , line 1, in 

Unauthorized: You are not allowed to access 'feed' in this context



On Jun 15, 2007, at 10:21 AM, Jonathan wrote:



----- Original Message - From: "Tom Von Lahndorff"  
<[EMAIL PROTECTED]>

To: 
Sent: Friday, June 15, 2007 10:18 AM
Subject: [Zope] Dictionary Key Error from Parsed RSS


Hi everyone, I've used Universal Feed Parser to parse an RSS  
feed.  Then used these instructions below to get the parsed data  
into Zope  via an External Method. Everything seems to work fine  
except that I  keep getting an error whenever I try to access a  
key from the  returned data. The resulting data is returned as a  
dictionary and if  I render it as is it works fine, however in  
both ZPT and DTML, when  trying to access a key, for instance  
"feed" or "href" from the  dictionary I'm prompted to login, which  
I'm unable to do with my  admin login. After hitting cancel I get  
a Key Error that says You are  not able to access 'href' (or  
whatever) in this context. Is there any  way to somehow let Zope  
know that this data is 'ok'? Thanks in advance.


You should post the full Key Error message with traceback (from  
error_log in the root folder of the zmi).


Jonathan


___
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] Dictionary Key Error from Parsed RSS

2007-06-15 Thread Tom Von Lahndorff
Hi everyone, I've used Universal Feed Parser to parse an RSS feed.  
Then used these instructions below to get the parsed data into Zope  
via an External Method. Everything seems to work fine except that I  
keep getting an error whenever I try to access a key from the  
returned data. The resulting data is returned as a dictionary and if  
I render it as is it works fine, however in both ZPT and DTML, when  
trying to access a key, for instance "feed" or "href" from the  
dictionary I'm prompted to login, which I'm unable to do with my  
admin login. After hitting cancel I get a Key Error that says You are  
not able to access 'href' (or whatever) in this context. Is there any  
way to somehow let Zope know that this data is 'ok'? Thanks in advance.


"Pre-requisites
==

- Zope 2.5.x (developed and tested with Zope 2.5.1, but other minor  
versions should work as well)


- feedparser.py 3.0 (http://diveintomark.org/projects/feed_parser/)  
developed and tested with 3.0 beta 22, the latest version


Installation


1. Installing feedparser.py
---

1.1. Unzip the archive (preserving path names) into /Zopesite/bin/lib/

1.2. open a command prompt window and go to /Zopesite/bin/lib/ 
feedparser/


1.3. enter the command (sans quotes): '..\..\python setup.py install'

1.4. after installation, enter the command: '..\..\python  
feedparsertest.py'


1.5. wait for testing to complete. On my laptop, 2051 tests ran in  
118.481s


2. Installing the external method
-

2.1 place the newsfeed.py module in the /Zopesite/Extensions/ directory
2.2 Add an external method to your zope site with an id and Module of  
'newsfeed', and a function of 'parsefeed'


3. Installing the feed template
---

3.1 Add a Page template to your Zope site with the contents of the  
nprnews.pt Page Template


3.2 examine the generic template rendering of NPR News, all fields  
from the feed should be available."

___
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] Automatic Cataloging

2007-06-10 Thread Tom Von Lahndorff


On Jun 10, 2007, at 2:49 AM, Andreas Jung wrote:




--On 9. Juni 2007 14:09:15 -0400 Tom Von Lahndorff  
<[EMAIL PROTECTED]> wrote:



Hi,

I have a zCatalog installed and I'm trying to automatically  
catalog an

object and it's properties using:








What a dirty code :-)

Such code should be written using a PythonScript:

newob = container.manage_clone(...)
newob.manage_changeProperties(REQUEST=context.REQUEST)
catalog.catalog_object(...)



im aware. humor me. :)





The zCatalog has indexes and metadata:
business_name
business_company
business_street
business_town
business_county
business_state
business_zipcode
business_phone
business_website
business_email

The object does get cataloged with the "newid" but none of the  
indexes or

metadata get updated.


Hard to believe...do you have properties defined for the particular  
object?


Yes. same names as whats listed above.



-aj



___
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] Automatic Cataloging

2007-06-09 Thread Tom Von Lahndorff

Hi,

I have a zCatalog installed and I'm trying to automatically catalog  
an object and it's properties using:







The zCatalog has indexes and metadata:
business_name
business_company
business_street
business_town
business_county
business_state
business_zipcode
business_phone
business_website
business_email

The object does get cataloged with the "newid" but none of the  
indexes or metadata get updated.

Thanks in advance.

Tom

___
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] adding objects to a ZCatalog

2007-02-23 Thread Tom Von Lahndorff



Peter Bengtsson wrote:

On 2/23/07, Tom Von Lahndorff <[EMAIL PROTECTED]> wrote:

Hi,

I have a folder called "images" and a form that to add images to that
folder. The form called an external method (../images/addImage) that
references a python script, the one I sent earlier, that creates 4
versions of the images in 4 sizes and places them in the "images"
folder. Also in the "images" folder I have a ZCatalog called
"ImageData". I'm trying to add a line to the python script to
automatically catalog any images that are added to the "images" folder.
I tried "ImageData.manage_catalogObject..." but I kept getting back:
NameError: global name 'ImageData' is not defined. Any advice? Thanks.


Perhaps you meant
context.ImageData.manage_catalogObject(...


This is the complete script:

def makeImages(self, imagefile, newkeywords, newcaption, newsource):

   import PIL.Image, ImageEnhance, ImageFilter
   import PIL
   from StringIO import StringIO
   import os.path
   import datetime
   import time

   # create the data in a new PIL Image.
   image=PIL.Image.open(imagefile)
   image=image.convert('RGB')
   image=image.filter(ImageFilter.SHARPEN)
   image=image.resize((640, 480), PIL.Image.ANTIALIAS)
   image2=image.resize((320, 240), PIL.Image.ANTIALIAS)
   image3=image.resize((160, 120), PIL.Image.ANTIALIAS)
   image4=image.resize((80, 60), PIL.Image.ANTIALIAS)

   # get the data in memory.
   newimage_file=StringIO()
   image.save(newimage_file, "JPEG")
   newimage_file.seek(0)
   newimage_file2=StringIO()
   image2.save(newimage_file2, "JPEG")
   newimage_file2.seek(0)
   newimage_file3=StringIO()
   image3.save(newimage_file3, "JPEG")
   newimage_file3.seek(0)
   newimage_file4=StringIO()
   image4.save(newimage_file4, "JPEG")
   newimage_file4.seek(0)

   # create an id for the image
   now = datetime.datetime.now()
   newimageid=now.strftime('%Y%m%d%H%M%S')
   newimage_id=newimageid + '-640.jpg'
   newimage_id2=newimageid + '-320.jpg'
   newimage_id3=newimageid + '-160.jpg'
   newimage_id4=newimageid + '-80.jpg'

   # if there's an old image, delete it
   if newimage_id in self.objectIds():
   self.manage_delObjects([newimage_id])
   if newimage_id2 in self.objectIds():
   self.manage_delObjects([newimage_id2])
   if newimage_id3 in self.objectIds():
   self.manage_delObjects([newimage_id3])
   if newimage_id4 in self.objectIds():
   self.manage_delObjects([newimage_id4])

   # create the Zope image object for the new image
   self.manage_addProduct['OFSP'].manage_addImage(newimage_id, 
newimage_file, '')
   self.manage_addProduct['OFSP'].manage_addImage(newimage_id2, 
newimage_file2, '')
   self.manage_addProduct['OFSP'].manage_addImage(newimage_id3, 
newimage_file3, '')
   self.manage_addProduct['OFSP'].manage_addImage(newimage_id4, 
newimage_file4, '')


   # now find the new zope object so we can modify
   # its properties.
   newimage_image=getattr(self, newimage_id)
   newimage_image.manage_addProperty('keywords', '', 'string')
   newimage_image.manage_addProperty('caption', '', 'string')
   newimage_image.manage_addProperty('imageid', '', 'string')
   newimage_image.manage_changeProperties(keywords=newkeywords, 
caption=newcaption, imageid=newimageid, source=newsource)

   context.ImageData.manage_catalogObject(newimage_image, uid)
   newimage_image2=getattr(self, newimage_id2)
   newimage_image2.manage_addProperty('imagefile2', '', 'string')
   newimage_image3=getattr(self, newimage_id3)
   newimage_image3.manage_addProperty('imagefile3', '', 'string')
   newimage_image4=getattr(self, newimage_id4)
   newimage_image4.manage_addProperty('imagefile4', '', 'string')




Tom
___
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 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] adding objects to a ZCatalog

2007-02-23 Thread Tom Von Lahndorff



Peter Bengtsson wrote:

On 2/23/07, Tom Von Lahndorff <[EMAIL PROTECTED]> wrote:

Hi,

I have a folder called "images" and a form that to add images to that
folder. The form called an external method (../images/addImage) that
references a python script, the one I sent earlier, that creates 4
versions of the images in 4 sizes and places them in the "images"
folder. Also in the "images" folder I have a ZCatalog called
"ImageData". I'm trying to add a line to the python script to
automatically catalog any images that are added to the "images" folder.
I tried "ImageData.manage_catalogObject..." but I kept getting back:
NameError: global name 'ImageData' is not defined. Any advice? Thanks.


Perhaps you meant
context.ImageData.manage_catalogObject(...


returns: "NameError: global name 'context' is not defined"



Tom
___
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 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] adding objects to a ZCatalog

2007-02-23 Thread Tom Von Lahndorff

Hi,

I have a folder called "images" and a form that to add images to that 
folder. The form called an external method (../images/addImage) that 
references a python script, the one I sent earlier, that creates 4 
versions of the images in 4 sizes and places them in the "images" 
folder. Also in the "images" folder I have a ZCatalog called 
"ImageData". I'm trying to add a line to the python script to 
automatically catalog any images that are added to the "images" folder. 
I tried "ImageData.manage_catalogObject..." but I kept getting back: 
NameError: global name 'ImageData' is not defined. Any advice? Thanks.


Tom
___
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] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Tom Von Lahndorff
Thanks for everyone's help. I got it to work, here's the script. It  
creates 4 images, enhances them and adds some properties to the  
largest one.


--

def makeImages(self, imagefile, newkeywords, newcaption):

import PIL.Image, ImageEnhance, ImageFilter
import PIL
from StringIO import StringIO
import os.path
import datetime
import time

# create the data in a new PIL Image.
image=PIL.Image.open(imagefile)
image=image.convert('RGB')
image=image.filter(ImageFilter.SHARPEN)
image=image.resize((640, 480), PIL.Image.ANTIALIAS)
image2=image.resize((320, 240), PIL.Image.ANTIALIAS)
image3=image.resize((160, 120), PIL.Image.ANTIALIAS)
image4=image.resize((80, 60), PIL.Image.ANTIALIAS)

# get the data in memory.
newimage_file=StringIO()
image.save(newimage_file, "JPEG")
newimage_file.seek(0)
newimage_file2=StringIO()
image2.save(newimage_file2, "JPEG")
newimage_file2.seek(0)
newimage_file3=StringIO()
image3.save(newimage_file3, "JPEG")
newimage_file3.seek(0)
newimage_file4=StringIO()
image4.save(newimage_file4, "JPEG")
newimage_file4.seek(0)

# create an id for the image
now = datetime.datetime.now()
newimageid=now.strftime('%Y%m%d%H%M%S')
newimage_id=newimageid + '-640.jpg'
newimage_id2=newimageid + '-320.jpg'
newimage_id3=newimageid + '-160.jpg'
newimage_id4=newimageid + '-80.jpg'

# if there's an old image, delete it
if newimage_id in self.objectIds():
self.manage_delObjects([newimage_id])
if newimage_id2 in self.objectIds():
self.manage_delObjects([newimage_id2])
if newimage_id3 in self.objectIds():
self.manage_delObjects([newimage_id3])
if newimage_id4 in self.objectIds():
self.manage_delObjects([newimage_id4])

# create the Zope image object for the new image
self.manage_addProduct['OFSP'].manage_addImage(newimage_id,  
newimage_file, '')
self.manage_addProduct['OFSP'].manage_addImage(newimage_id2,  
newimage_file2, '')
self.manage_addProduct['OFSP'].manage_addImage(newimage_id3,  
newimage_file3, '')
self.manage_addProduct['OFSP'].manage_addImage(newimage_id4,  
newimage_file4, '')


# now find the new zope object so we can modify
# its properties.
newimage_image=getattr(self, newimage_id)
newimage_image.manage_addProperty('keywords', '', 'string')
newimage_image.manage_addProperty('caption', '', 'string')
newimage_image.manage_addProperty('imageid', '', 'string')
newimage_image.manage_changeProperties(keywords=newkeywords,  
caption=newcaption, imageid=newimageid)

newimage_image2=getattr(self, newimage_id2)
newimage_image2.manage_addProperty('imagefile2', '', 'string')
newimage_image3=getattr(self, newimage_id3)
newimage_image3.manage_addProperty('imagefile3', '', 'string')
newimage_image4=getattr(self, newimage_id4)
newimage_image4.manage_addProperty('imagefile4', '', 'string')

--

On Feb 22, 2007, at 4:11 PM, Andrew Langmead wrote:


On Feb 22, 2007, at 1:29 PM, Tom Von Lahndorff wrote:


8original_image=getattr(self, original_id)
9original_file=StringIO(str(original_image.data))

[and later]

AttributeError: DSCF0004.jpg


I think your line numbers are off by one, because I'd think it is  
the getattr that would be causing the Attribute Error (at most,  
line "9" could give an attribute error for something called "data".


Zope turns file upload objects into   
ZPublisher.HTTPRequest.FileUpload instances. and pass them to your  
method. FileUpload instances have an interface similar to python  
file objects, you can .read(), .seek(), .close() or do whatever you  
want to them and might not need to wrap the contents into a  
StringIO object first. (your trying to fetch the file as an  
attribute of "self" seems to imply that you think the form data is  
already uploaded into zope and is an Image object in a folder. It  
isn't there yet, and won't be unless you store it there.)


I think if you removed lines 8 and 9 (by your numbering) and  
renamed the second argument to the method to "original_file",  
things would work as you need:


1 def makeImages(self, original_file):
2
3import PIL.Image
4import PIL
5import os.path
6
...





___
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] Resizing an Image with PIL via a Form Upload

2007-02-22 Thread Tom Von Lahndorff


I'm trying to resize an image uploaded from a form using PIL. I got it 
to work on an existing image but I can't seem to get it to work on an 
image that's uploaded through the form. The ID of the file I'm trying to 
upload is "DSCF0004.jpg". The form, script and traceback are listed 
below. Thanks in advance.


enctype="multipart.form-data">
 name="submit" value=" Add ">



(imgSizer External Method)
1 def makeImages(self, original_id):
2 
3import PIL.Image

4import PIL
5from StringIO import StringIO
6import os.path
7
8original_image=getattr(self, original_id)
9original_file=StringIO(str(original_image.data))
...

returns:

Traceback (innermost last):

   * Module ZPublisher.Publish, line 115, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 41, in call_object
   * Module Products.ExternalMethod.ExternalMethod, line 225, in __call__
 __traceback_info__: ((,
 'DSCF0004.jpg'), {}, None)
   * Module .../Zope/Extensions/imgSizer.py, line 9, in makeImages

AttributeError: DSCF0004.jpg

___
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] LocalFS1.7rc1 with Zope 2.10.1

2006-12-28 Thread Tom Von Lahndorff

Thanks! worked.

Andreas Jung wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 28. Dezember 2006 12:50:39 -0500 Tom Von Lahndorff <[EMAIL PROTECTED]> 
wrote:


  

Im unable to install LocalFS 1.7rc1 into a Zope 2.10.1 instance. I place
the folder in the Products directory but upon restart nothing shows up in
Zope. Any ideas as to what may be causing the problem or any suggestions
for an alternative product for accessing filesystem files in Zope? IM not
getting any error message, it just doesnt show up in the list of
installed products or the add menu.





Running Zope in debug mode will tell you:

2006-12-28 19:06:58 ERROR Application Could not import Products.LocalFS
Traceback (most recent call last):
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/OFS/Application.py", 
line 703, in import_product

product=__import__(pname, global_dict, global_dict, silly)
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Products/LocalFS/__init__.py", 
line 44, in ?

import os, LocalFS
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Products/LocalFS/LocalFS.py", 
line 52, in ?

from OFS.content_types import find_binary
ImportError: cannot import name find_binary
Traceback (most recent call last):
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Zope2/Startup/run.py", 
line 56, in ?

run()
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Zope2/Startup/run.py", 
line 21, in run

starter.prepare()
  File 
"/Users/ajung/sandboxes/Zope-2.10/Zope/lib/python/Zope2/Startup/__init__.py", 
line 102, in prepare

self.startZope()
  File 
"/Users/ajung/sandboxes/Zope-2.10/Zope/lib/python/Zope2/Startup/__init__.py", 
line 278, in startZope

Zope2.startup()
  File 
"/Users/ajung/sandboxes/Zope-2.10/Zope/lib/python/Zope2/__init__.py", line 
47, in startup

_startup()
  File 
"/Users/ajung/sandboxes/Zope-2.10/Zope/lib/python/Zope2/App/startup.py", 
line 45, in startup

OFS.Application.import_products()
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/OFS/Application.py", 
line 680, in import_products

import_product(product_dir, product_name, raise_exc=debug_mode)
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/OFS/Application.py", 
line 703, in import_product

product=__import__(pname, global_dict, global_dict, silly)
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Products/LocalFS/__init__.py", 
line 44, in ?

import os, LocalFS
  File 
"/Users/ajung_data/sandboxes/Zope-2.10/Zope/lib/python/Products/LocalFS/LocalFS.py", 
line 52, in ?

from OFS.content_types import find_binary


Try to adjust the code to use zope.contenttype

- -aj

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFlAgGCJIWIbr9KYwRAiqmAJ91dGtq2DB0kh9kDCL6G/lXzrU2ugCbBRUN
GGxLaV3+1+1CXML7eBpcLIY=
=K54p
-END 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] LocalFS1.7rc1 with Zope 2.10.1

2006-12-28 Thread Tom Von Lahndorff


Im unable to install LocalFS 1.7rc1 into a Zope 2.10.1 instance. I place 
the folder in the Products directory but upon restart nothing shows up 
in Zope. Any ideas as to what may be causing the problem or any 
suggestions for an alternative product for accessing filesystem files in 
Zope? IM not getting any error message, it just doesnt show up in the 
list of installed products or the add menu.


Tom
___
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] Zope on Mac OS X Server

2006-11-17 Thread Tom Von Lahndorff
Hi I'm having trouble setting redirecting port 80 to port 8080 on Mac OS 
X Server 10.4. I installed Zope via the Plone installer and have a an 
Instance running in the Applications folder. I can access the ZMI on 
port 8080 via the machines IP address, but I can't seem to get the 
Apache rewrite rule to work as shown in the various documentation. I'm 
curious if anyone has done this before and/or has used OS X Server's 
Server Admin tool to create an alias or redirect from port 80 to 8080. 
Thanks in advance.


Tom
___
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 )