[Zope] How can I import this module in python script ?????

2007-02-26 Thread ian
Hi,
I am playing around trying to make something happen on a workflow state
change. Beacause I cannot import the module I need in the python script I
am getting an error:
global name 'getMemberById' is not defined
how can I import this module or better still code this so I am not
importing anything at all (i imagine the restrictions on importing modules
was done for a reason).

#import the module we need
from Products.CMFCore.utils import getToolByName

# Get the content object we're publishing
review_state.object

# How can I import this module?
#from Products.CMFDefault.MembershipTool import MembershipTool

mt = getToolByName(context, 'portal_membership')

listed_ids = mt.getRoster()

contentObject = review_state


# Start with an empty list, ready to be filled with the addressed
# of people we're dispatching to
mailList=[]


mailhost = context.MailHost
mailhost = getattr(context, 'MailHost', None)


# Iterate through all the site's users
# context.portal_membership.listMembers():
for id in listed_ids:
member = getMemberById(id)
email = member.getProperty('email')

# add them to the list of people we're emailing
mailList.append(email)

mMsg = 'Crop notification sent'
mTo = email
# and send it
mailhost.send(mMsg, mTo, '[EMAIL PROTECTED]', 'New Crops available')

# The change in indentation signals the end of the loop, so we've
# now sent all the emails. Let's now send a confirmation that we've done it.

# We'll be building the email as a string again, but we have to convert our
# list data elements into a string before we can append the information

recipients = string.join(mailList)


mMsg = 'These people were sent e-mails'
#mMsg += contentObject.absolute_url() +
mMsg += recipients
mailhost.send(mMsg, '[EMAIL PROTECTED]', '[EMAIL PROTECTED]',
'Lizard Leaves Announcement email confirmation')

thx
[]'s
Ian





F U cn rd dis U mst uz Linux.


___
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] Migrating to Zope 2.10.1 breaks unrestrictedTraverse

2007-01-25 Thread Ian McCracken
I'm trying to get an object by walking a path. Previously, I used 
baseobject.unrestrictedTraverse(path).  Upon migrating to 2.10.1, 
though, doing the same thing often produces the following error:


 File "/usr/local/zenoss/Products/ZenModel/Organizer.py", line 148, in 
getOrganizer

   return self.getDmdRoot(self.dmdRootName).unrestrictedTraverse(path) 


 File "usr/local/zenoss/lib/python/OFS/Traversable.py", line 259, in 
unrestrictedTraverse

AttributeError: REQUEST


The problem appears to be that the Traversable mixin assumes that 
self.REQUEST will be available; since we're calling it from outside 
Zope, though, there is no request.  Any thoughts? Why was this changed, 
and is there an extant way to get the same result without just writing a 
simple method that walks the path?


Thanks,
Ian McCracken


___
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] Zeo question

2006-12-13 Thread ian

Ola,

You can easily do this by changing the 'display' routines on each zope 

instance

I feel so stupid asking but what do you mean by this...i have googled 
but cannot find anything about 'zope display routines' ...

Do you mean this:
In the zope instances I can create a folder custom and place my 
customizations in there..


--
so I create logo_manaus.jpg for Manaus and this goes in the folder 
custom on the zope instance in Manaus and then i create logo_belem.jpg 
for Belem in the folder custom on the zope instance in Belem...and we 
live happily ever after ;)

--

I think my problem is that i do not really understand what is stored in 
the ZODB...is it just content or is it content and configuration

[]'s

--
Ian Lawrence
http://ianlawrence.info

Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html


>>> return [type for type in types if type not in types_to_exclude]
If you can see the beauty, then Python got you
___
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] Zeo question

2006-12-13 Thread ian

Ola,
thx maciej and Jonathan...your answers have helped a lot

Each zope instance can access multiple ZODB's (as Maciej mentions 
later), which means that the zope instance can access both a shared zodb 
and a local zodb which is specific to the zope instance.


auaua...i didn't know that ;)...this is really cool. Now the inevitable 
question - 'Is there any documentation about how to set this up ?'
Maybe I just define another  in my zope.conf and mount it into 
a folder like maciej said and just customize this folder.
What i need to do is just create a custom skin on each zope instance to 
show that it is Manaus,Belem or wherever serving the information but 
have the same global content shown in each instance. From what you have 
said it seems this should be possible with a bit of tweaking



Zope is very flexible!  You just need to build a configuration which 
meets your use case!


welcome to OSS, eh !

[]'s


--
Ian Lawrence
http://ianlawrence.info

Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html


>>> return [type for type in types if type not in types_to_exclude]
If you can see the beauty, then Python got you
___
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] Zeo question

2006-12-12 Thread ian

Hi,
Hope you can help
1. I am having trouble connecting a zope client to a zeo database.The 
server and client are in different goegraphical locations and behind 
different proxies and firewalls. I read that they communicate using a 
'custom RPC protocol'...what does this mean and does it have any 
influence on which firewall/proxy rules we need to implement on our 
network??
2. I can create a custom skin on each zope (in reality plone) instance 
right or is each zope instance is just a mirror of the other?

thx
--
Ian Lawrence
http://ianlawrence.info

Centre for Bioinformatics
INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
MANAUS-AMAZONAS-BRAZIL
Research Program in Biodiversity
http://ppbio.inpa.gov.br
PHONE: 055-92-3643-3358
CEP. 69011 -970

| Please do not send me documents in a closed
| format.(*.doc,*.xls,*.ppt)
| Use the open alternatives. (*.pdf,*.html,*.txt)
http://www.gnu.org/philosophy/no-word-attachments.html


>>> return [type for type in types if type not in types_to_exclude]
If you can see the beauty, then Python got you
___
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] Ecommerce solutions

2005-03-30 Thread Ian Nunn




Has anyone used Zopewith a shopping cart such as 
AgoraCart to create an online store?
 
Best RegardsIan Nunn
___
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] Recall: default page is zope_quick_start! - Zope 2.3 release for windows

2001-01-30 Thread Ian Thomas

Ian Thomas would like to recall the message, "default page is
zope_quick_start! - Zope 2.3 release for windows".

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




[Zope] default page is zope_quick_start! - Zope 2.3 release for windows

2001-01-30 Thread Ian Thomas

A little problem I'm having with the new Zope 2.3 - Windows version.
 
I edited index_html and it works fine if I enter 
http://host.com/index_html  but if I enter
http://host.com it gives me the quick start page zope_quick_start!
 
Does anybody know off hand where this page is stored so I can edit it 
directly?  A workaround until 2.3.1 is released. or better where to fix
this
in the code!
 
Ian Thomas

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




Re: [Zope] Can't reproduce :-(

2001-01-26 Thread Ian Sealy

Dear all,

> > > > We need to get this fixed ASAP so my boss has told me to send this
> > > > message to the list and offer 400 pounds (sterling) to anyone who can
> > > > fix this bug. Any takers?
> > >
> > > What version of Zope are you using?
> > 
> > 2.2.5 on Red Hat 6.2.
>   > 
> > Zope version: Zope 2.2.5 (source release, python 1.5.2, linux2)
> > Python version: 1.5.2 (#1, Nov 18 2000, 20:03:24) [GCC egcs-2.91.66 19990314/Linux 
>(egcs-
> > System Platform: linux2
> 
> Well, sorry to say, on Zope 2.2.4 and 2.2.5 under Linux and WinNT using files
> between 1kb and 110Mb (Boy, did Netscape like that ;-), I can't reproduce this
> :-(
> 
> If anyone comes up with a fail safe way of reproducing the bug, I'd love to nail
> it, 'cos it sounds like fun :-)

I've finally managed to replicate the bug consistently, so I've just
submitted it to the Collector:

http://classic.zope.org:8080/Collector/1895/view

I now know what causes it so I'm able to work around it, which means
that I'm afraid the offer of 400 quid to fix the bug is now
withdrawn. Sorry.

The bug only occurs if the DTML Method that adds the large file tries to
call a Z SQL Method that uses the ZPyGreSQLDA. Here's the description I
just submitted to the Collector:

Occurs on Zope 2.2.5 with ZPyGreSQLDA-0-0-3 installed. If you have a
form like this:



Filename: 



and a DTML Method called addfile:



OK

where sql is a Z SQL Method that uses a PyGreSQL database connection.
Trying to upload a file larger than about 128 kb gives:

Error Type: AttributeError
Error Value: abort_sub

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: Traversable)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
  File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
AttributeError: (see above)

Cheers,
Ian


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




Re: [Zope] BUG: subtransaction not handled correctly in "manage_addFile"

2001-01-26 Thread Ian Sealy

Dear Chris,

> > We need to get this fixed ASAP so my boss has told me to send this
> > message to the list and offer 400 pounds (sterling) to anyone who can
> > fix this bug. Any takers?
> 
> What version of Zope are you using?

2.2.5 on Red Hat 6.2.

Zope version: Zope 2.2.5 (source release, python 1.5.2, linux2) 
Python version: 1.5.2 (#1, Nov 18 2000, 20:03:24) [GCC egcs-2.91.66 19990314/Linux 
(egcs- 
System Platform: linux2 

Cheers,
Ian


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




[Zope] BUG: subtransaction not handled correctly in "manage_addFile"

2001-01-26 Thread Ian Sealy

Dear all,

Does anyone fancy earning a bit of pocket money? I've got a Zope problem
that I can't solve because my Python isn't good enough and my
understanding of the ZODB is pretty much still zero.

We've got a simple Zope application that allows users to upload files
without going near the Zope management screens. For more information on
this and what the problem is, see:

http://www.egroups.com/message/zope/48084

The basic thrust is that when a large file is uploaded and
subtransactions are needed, something goes wrong.

Dieter Maurer sent a reply helpful reply (thanks Dieter) that's archived
at:

http://www.egroups.com/message/zope/48116

In it, he said:

> On the other hand, the bug is triggered by
> something. I would expect, it is an
> exception in "ZODB.Transaction:261",
> AttributeError "commit_sub".
> You can verify this, if you put an
> "import traceback; traceback.print_exc()"
> below line 270.
> Problably some non-subtransaction object
> managed to enter in "subjars".

Sure enough, Dieter was right. I get:

Traceback (innermost last):
  File "/usr/local/zope/lib/python/ZODB/Transaction.py", line 261, in commit
j.commit_sub(self)
AttributeError: commit_sub

Dieter told me to file a bug report (and he's told a couple of other
people the same thing since) but I haven't yet because I'm having
trouble replicating the problem. I can't replicate it by just copying
the two salient methods to a fresh Zope installation of Zope 2.2.5.
Other messages (e.g. < http://www.egroups.com/message/zope/48492 >) made
me suspect that it was a problem with a Product, but installing the
Products I'm using (SiteAccess, ZOracleDA, ZPyGreSQLDA and
smbUserFolder) to this fresh installation didn't replicate the bug. I
only see it if I copy over the Data.fs from the original installation.

Other people seem to have come across the same problem in different
contexts. Have a look at:

http://groups.yahoo.com/group/zope/messagesearch?query=commit_sub

We need to get this fixed ASAP so my boss has told me to send this
message to the list and offer 400 pounds (sterling) to anyone who can
fix this bug. Any takers?

Cheers,
Ian


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




[Zope] Adding to an XMLDocument through web forms

2001-01-18 Thread Ian Campbell


Hi,

I`m looking for a way to give a user the ability to add new data to an
XMLDocument through web forms, does anyone have experience of this or would
be able to point me in the direction of an example or howto?

I have a file similar to:


  
  ...
  
  
  ...
  


So i`d have two web forms, one to add a new  and another to add an
, taking the data from a form is obviously simple but adding
this to my XMLDocument has stumped me. Any help would be appreciated.

Ian


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




[Zope] Zope digest, Vol 1 #1151 - 61 msgs

2001-01-18 Thread ian . sealy

8


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




[Zope] Zope digest, Vol 1 #1150 - 54 msgs

2001-01-18 Thread ian . sealy

8


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




[Zope] Unexplained Slowdown

2001-01-17 Thread Ian Thomas

When I upgraded to Zope 2.2.5 access to my Zope over the web slowed down
dramatically and I haven't been able to figure out why. I am interested
in ideas I can try to track it down the problem or at least
quantify/benchmark the slowness. 

Some background.
1) I am a computer teacher teaching Zope to my second year web
development students who have already learned HTML and been introduced
to JavaScript. 
2) The server is a my test machine that my students and I use for
learning.
3) The "production" server still running 2.2.4 continues to preform
normally.
4) The machine is Celeron 500 mhz 64 meg ram running Windows 2000 Server
5) I run Medusa server that comes with Zope to server the web pages.
6) There is no gateway set up on this machine so that it is only visible
from within the school.

Notes.
1) It is much faster if I access via localhost on the server.

What I have tried.
1) Installing 2.2.4 on another port. It ran just as slow.
2) Today I removed the 2.2.4 installation and installed 2.3beta, again
it seems just as slow.

What Next?
The next thing I was thinking was to serve the webpages from IIS using
PCGI.
I am interested in other ideas.

I. Thomas





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




[Zope] Re: manage_addFile problem

2001-01-04 Thread Ian Sealy

Dear all,

I sent the following message to the list just before Christmas, but
didn't get any replies. I've tried changing the admin_addfiles method
to:

  
  
  
  
  
  

but I still get the same error. Has anyone got any advice? I can't see
how this is different from adding a file using the management screens.

> I've got a really simple little Zope application that allows staff here
> to upload documents into a folder of their choice without seeing the
> Zope management screens. There's a form that looks like this:
> 
>   
>   
> etc...
> 
> The admin_addfiles method then actually creates the file and applies
> some properties to it (that also come from the form):
> 
>   
>   
>   
>   
>   
>   
> 
> It all works fine until I try to upload a file that's greater than about
> 128 kb. When I try that I get the following error:
> 
> Error Type: AttributeError
> Error Value: abort_sub
> 
> Traceback (innermost last):
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
>   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
>zpublisher_exception_hook
> (Object: Traversable)
>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in publish
>   File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
>   File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
> AttributeError: (see above)
> 
> I don't see this if I add a similar-sized file using the Zope management
> screens. Anyone done anything similar and seen this?

Cheers,
Ian


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




[Zope] manage_addFile problem

2000-12-21 Thread Ian Sealy

Dear all,

I've got a really simple little Zope application that allows staff here
to upload documents into a folder of their choice without seeing the
Zope management screens. There's a form that looks like this:

  
  
etc...

The admin_addfiles method then actually creates the file and applies
some properties to it (that also come from the form):

  
  
  
  
  
  

It all works fine until I try to upload a file that's greater than about
128 kb. When I try that I get the following error:

Error Type: AttributeError
Error Value: abort_sub

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: Traversable)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 175, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 235, in commit
  File /usr/local/zope/lib/python/ZODB/Transaction.py, line 290, in commit
AttributeError: (see above)

I don't see this if I add a similar-sized file using the Zope management
screens. Anyone done anything similar and seen this?

Cheers,
Ian

--
Dr Ian Sealy
Internet Development
Institute for Learning and Research Technology
University of Bristol


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




Re: [Zope] The tree tag, SQL and what should be simple

2000-08-30 Thread Ian J Cottee

"Rik Hoekstra" <[EMAIL PROTECTED]> writes:
 
> Unless I do not quite understand you I think you missed Anthony Baxter's
> tree_and_sql howto
> (http://www.zope.org/Members/anthony/tree-coding-tricks ). It will probably
> give you either exactly what you want or enough ideas to get you further.

Hi

Yes, I looked over that document and unfortunately it doesn't help
me. It talks about a *one* file structure where each item in a file
can be related to another item. I'm looking at a simple two file
structure of records and categories and being able to display those
categories in a shallow, two level tree. 

I've given up for the moment and written my display screen in a way
which probably makes more sense but I'd still be interested to know
for the future how it works

Cheers

Ian

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




Re: [Zope] Logfile analyzer

2000-08-30 Thread Ian Bicking

On Tue, Aug 29, 2000 at 03:36:25PM -0700, Kapil Thangavelu wrote:
> > Anyway, I've been thinking of polishing and expanding what I've
> > written some, so it's suitable for public use (or at least use by
> > people who know Zope/Python fairly well).  But this requires work that
> > I probably wouldn't do for myself -- so I'm writing to see if there
> > are enough people who have interest in this to make it worth it.  [Or
> > if this already exists and I just haven't found it]
> 
> zope's logs are in a pretty standard format so most of your loganalyzers
> should handle them well and several of them can be customized to ignore
> certain ips or urls.

Of course.  I'm actually parsing Apache logs on my own site, as this
covers both the Zope and non-Zope portions of my page.  The basic
analysis isn't Zope-specific, just more Zope-accessible.  For
instance, hits are returned as a list of page/count pairs, and then
you can format then as you wish with DTML.

Any of these things that I've done could be done by other log
analyzers, and I expect they have been.  They could probably be done
better: the real advantage of what I'm doing (in my own experience) is 
that I have a fair amount of control to do whatever I want, not just
what was included in the software.  Anyone who knows some Python would
be able to have a similar amount of control.

> i've been told that http://www.webalizer.org/ is pretty nice.
> 
> a zope web logs analyzer that makes images with PIL integrated into the
> control panel, is on my list of things to do although its pretty low at
> the moment.

I hadn't been thinking of using PIL myself -- though it would be
relatively easy, I suppose, to add another layer that creates graphs
from the (relatively) raw data.

  -- Ian

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




[Zope] Logfile analyzer

2000-08-29 Thread Ian Bicking

I've been making some log analysis code on my site, and have realized
that a lot of other analyzers aren't that great -- or, at least, that
it's nice to have the control that editting the actual code can give.
(for instance, I ignore all requests that come from my ISP, since I
don't need to know what my surfing habits are; I ignore all pages
that end in "manage.*"; etc.)

Anyway, I've been thinking of polishing and expanding what I've
written some, so it's suitable for public use (or at least use by
people who know Zope/Python fairly well).  But this requires work that 
I probably wouldn't do for myself -- so I'm writing to see if there
are enough people who have interest in this to make it worth it.  [Or
if this already exists and I just haven't found it]

Cheers,
  Ian

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




[Zope] Case sensitivity

2000-07-13 Thread Ian Sparks

One of my pet peeves with web servers is that :

mysite.com/Members

is different to :

mysite.com/members

(but there is no difference between MYSITE.COM and mysite.com)

is there any way of making Zope case-insensitive?

- Ian Sparks.



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




[Zope] Comfirming Hotfix is installed.

2000-06-16 Thread Ian Thomas

Is there any way to confirm that the hotfix has been installed?

I extracted the files and restarted Zope but it would be nice if there was
a way to confirm that it is installed.



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




Re: [Zope] Traversable DTML methods

2000-06-12 Thread Ian Sparks

<<
The one reason that may still exist for not making DTML Methods traversable
as you're suggesting would be if you want to call a DTML Method within the
acquisition context of another... something that some people may want to do
(I never have though). If a DTML Method chops off everything that follows in
the URL, then that remaining part of the URL can't be used for acquiring
other methods.
<<

I don't see DTML Methods as "chopping off" the URL so much as "consuming"
parts of it. SQL Methods have this behaviour now :

www.mysite.com/flavor/cherry/showme

Where "flavor" is a SQL Method which takes a single parameter "cherry" and
"showme" is a DTML Document which makes some use of the flavor SQL Method.
In this instance "flavor" consumes the next part of the url because it is
looking for a parameter and when it is finished hands on control to the
next, unconsumed part of the URL "showme".

Notice though that I have to have the "showme" DTML Method to actually
display the results. If "flavor" was a parmeterized DTML Method my URL could
become :

www.mysite.com/flavor/cherry

which makes more sense to me. In this case the "flavor" DTML Method would
consume the "cherry" parameter, perhaps call some SQL Method to get the data
for the "cherry" display and then display itself.

If the parameters could have defaults then I could have URL's like :

www.mysite.com/members/ian/
www.mysite.com/members/ian/home
www.mysite.com/members/ian/preferences
www.mysite.com/members/ian/todo

Where "members" is a DTML method which takes parameters ,
(default : "home") and decides what to display based on the parameters
passed.

This allows my "users" to become virtual (by which I mean DB-based). I can
do the last 3 URL's now with SQL Methods ("home", "preferences" and "todo"
become DTML documents or methods which are aquired) but I can't do the first
URL because SQLMethods don't do any rendering for display.

Well, that got rambling but it lays my argument out in full I think.

- Ian.


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




Re: [Zope] Traversable DTML methods

2000-06-11 Thread Ian Sparks



Kevin Said :

>>
Hmm... what does it mean, exactly, to "traverse a DTML method"? DTML Methods
don't have subobjects, so it seems like you're basically trying to look up
other objects or information via information passed in the URL. That seems
like the kind of program logic that is much cleaner in python and that
people are trying to keep out of DTML. DTML really does start getting ugly
and hairy when you try to put complex logic in it.
<<

Dieter Said :

>>
Your DTML Methods have (keyword) parameters.

>From DTML: "(_.None,_,param1=value1, param2=value2, )"
>From HTML: "?param1=value1¶m2=value2&"
   everything after "?" is URL(plus)encoded.
<<

Dieter is right, DTML methods can get parameters from the URL but they don't
do it in the same way as SQLMethods and that, to answer Kevins question, is
what I mean by making DTML Methods "traversable" (apologies if my
terminology is off).

I'd like to be able to pass a parameter to a "members" DTML method with a
syntax like :

www.mysite.com/members/ian

which is much nicer than :

www.mysite.com/members?user=ian

which is what Dieter suggests.

>From my Zope-newbie perspective I don't see that allowing parameters to
DTMLMethods, framed as part of the URL is any more complex than what goes on
with SQLMethods but I admit this may be because I have not grasped the Zen
of Zope.

- Ian Sparks.




- Original Message -
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, June 11, 2000 7:03 PM
Subject: Re: [Zope] Traversable DTML methods


Ian Sparks writes:
 > It seems strange to me that SQLMethods are traversable out of the box and
 > "normal" DTML methods are not.
 >
 > It seems to me that traversable DTML methods would be useful (to me this
 > means DTML Methods with parameters).
Your DTML Methods have (keyword) parameters.

>From DTML: "(_.None,_,param1=value1, param2=value2, )"
>From HTML: "?param1=value1¶m2=value2&"
   everything after "?" is URL(plus)encoded.


Dieter

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





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




Re: [Zope] Traversable DTML methods

2000-06-11 Thread Ian Sparks

>>
Use a pythonmethod with the traverse_subpath argument...
<<

Thanks for the advice Anthony, this has been suggested to my by others.
Could you point me to some Docs or Howto on this subject?

My view is that you shouldn't have to go to Python to make this happen
(though I am glad that you can!) and that DTML Methods should be traversable
out of the box.

- Ian.




- Original Message -
From: "Anthony Baxter" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, June 11, 2000 4:14 AM
Subject: Re: [Zope] Traversable DTML methods



Use a pythonmethod with the traverse_subpath argument...

Anthony

>>> "Ian Sparks" wrote
> It seems strange to me that SQLMethods are traversable out of the box and
> "normal" DTML methods are not.
>
> It seems to me that traversable DTML methods would be useful (to me this
> means DTML Methods with parameters).
>
> Is this something that might make it into Zope in the future or am I
missing
> something important which means that they simply arn't necessary?
>
> - Ian Sparks.
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>

--
Anthony Baxter <[EMAIL PROTECTED]>
It's never too late to have a happy childhood.


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





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




[Zope] Traversable DTML methods

2000-06-10 Thread Ian Sparks

It seems strange to me that SQLMethods are traversable out of the box and
"normal" DTML methods are not.

It seems to me that traversable DTML methods would be useful (to me this
means DTML Methods with parameters).

Is this something that might make it into Zope in the future or am I missing
something important which means that they simply arn't necessary?

- Ian Sparks.


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




Re: [Zope] How do you call the string?

2000-06-09 Thread Ian Sparks

Martin,

I'm no Zope expert but if you have a property with an ID of "prop1" of type
string with a value "first_value" set on a DTML Document then inside the
document you can say :



and "first_value" will be substituted into your code at this point,
replacing the "" declaration.

I am not sure why you want to get the title? You only need to know the ID to
get the value.

Are you trying to find a way of looping through all the properties defined
for a document? If yes, I don't know how to do this but ask again to
[EMAIL PROTECTED] for how to do this.

Sorry if this doesn't answer your question.

- Ian.












- Original Message -----
From: "Martin Seehuusen" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Sent: Thursday, June 08, 2000 10:50 AM
Subject: Re: [Zope] How do you call the string?


Thank you for you help!

I think I need to explain a bit more! Sorry for not doing that in the first
place!

OK, I go into Properties for one of my files!
then I choose an ID, say "prop1"
Type could be, say "String"
then a value, say "first_value".

now what I would like is to call the string, and get up the ID and the
Value.
something like



result:

ID: Prop1
Value: First_Value

Hope this explains a bit more! ;)

Thank you for your help.

Best regards

Martin Seehuusen





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




[Zope] How do you changing web port address of Zserver installed as a service on Win NT4?rvice on Win NT4?

2000-06-07 Thread Ian Thomas

I am looking for some guidance on how to change the web port address of my
Zserver. I can use the -P option START.BAT file and start it manually but I 
haven't been able to figure out how to change it when I am starting the 
Zserver up as a service on a WinNT 4 box.
It works fine on port 8080 but I now need to move it off of  that port.


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




[Zope] How to catch URL in DTMLDocuments/Methods

2000-06-07 Thread Ian Sparks

Hi,

As a Zope newbie I'm still not entirely sure about how to capture the URL as
Zope traverses the tree.

For instance, my site called with :

mysite.com/members/ian/preferences/10

"members" is a DTMLMethod or Document. What I want to do is trap the URL
once it has entered "members".

So inside "members" I want to do things like :

1. Get the next part of the url ("ian") and run an SQLMethod using this as a
parameter (calling SQLMethods I understand).
2. Get the part after that, "preferences" and pull in my "preferences" DTML
page from /templates/preferences, possibly passing it the next part of the
url "10" as a parameter to that DTML page.

The conceptual problem I have is that DTMLMethods/Documents don't have a
parameters tag like SQLMethods do, so I don't see how I can "trap" parts of
the URL like SQLMethods do and use them internally in my Method/Document.

I know I keep asking this type of question, please bear with me 'till I get
it!

- Ian Sparks.


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




Re: [Zope] www.mysite.com/Members/

2000-06-06 Thread Ian Sparks

J,

Big thanks!

I like it!

Rubs hands together with glee

(cc'd list so other newbies can get the importance of this URL).

- Original Message -
From: "J. Atwood" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2000 4:19 PM
Subject: Re: [Zope] www.mysite.com/Members/


http://www.zope.org/Members/mcdonc/HowTos/direct_traversal

That should do it.

JMA

>
> I'm not sure how to pull apart the URL to grab the peices of it which are
> parameters to the query. So if the url was :
> www.mysite.com/members/Ian/preferences and I am in the "members" DTML
method
> how do I :
>
> 1) Know where I am in the URL and
> 2) Get at the next N elements of it to pull out "Ian" and "Preferences".
I
> am aware of URL0, URL1..URLN etc but this doesn't seem to help here.



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




Re: [Zope] www.mysite.com/Members/

2000-06-06 Thread Ian Sparks

Bill,

Thanks for the reply. Yes, I would be getting the data from a SQL statement.

Let me explain what I am trying to achieve.

I want to structure my site like this :

http://mysite.com/Members/
To: "Ian Sparks" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2000 10:32 AM
Subject: Re: [Zope] www.mysite.com/Members/


Ian Sparks wrote:
>
> I have the source here, perhaps you can point me to where I should be
> looking - the PTK is reasonably large.
>
> AFAICS the PTK uses a folder called Members and adds folders under that
for
> each registered user :
>
> Members
>Fred
>   FredContent1
>   FredContent2
>   FredContent3
>Jim
>   JimsContent
>
> Nothing database-driven about that.


See below...

...

> >I want to produce a home-page on my site using a URL like :
> >
> >http://www.zope.org/Members/Fred
> >
> >
> >I'm a little confused as to how I would go about this in a dynamic way
> where
> >I would pull the contents of the page out of a database.
> >
> >A non-database way would be to :
> >
> >/Members (folder)
> >/Fred (sub-folder or Document)
> >/Jim (sub-folder or Document)
> >/Jane (sub-folder or Document)
> >
> >But I want to be able to generate the /Members/Fred page dynamically.


What exactly would you generate this off of?

I would guess from data in a databse (SQL)?

If so, you could do a select statement to ge tthe userlist.
You would then make a 'template' that built a page from the data in a
database, where username==username (ie Fred).

But, you could be asking for something completely different. ;)

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





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




Re: [Zope] How do you call the string?

2000-06-05 Thread Ian Sparks

I'm not sure what you mean by "call the string"?

If you have some properties of a DTML Document you can call them within that
document by saying .

So if you had a property "count" you could say 

If this doesn't answer your question, try to re-phrase it so we can get a
better idea of what you are trying to do.

- Ian.


- Original Message -
From: "Martin Seehuusen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 04, 2000 4:26 PM
Subject: [Zope] How do you call the string?


Hi!

I would like to look up the properties on an html file that I've made.
I've made a string on my html file, but I'm not sure how to call it!
I've understood that a  is to be used, but I don't know
what the string is called. Could someone help me with that!?

/Martin S.



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





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




Re: [Zope] www.mysite.com/Members/

2000-06-05 Thread Ian Sparks

I have the source here, perhaps you can point me to where I should be
looking - the PTK is reasonably large.

AFAICS the PTK uses a folder called Members and adds folders under that for
each registered user :

Members
   Fred
  FredContent1
  FredContent2
  FredContent3
   Jim
  JimsContent

Nothing database-driven about that.

Thanks for your help.

- Ian.



- Original Message -
From: "Philipp Dunkel" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 5:36 PM
Subject: Re: [Zope] www.mysite.com/Members/


At 17:23 05.06.00 +0100, Ian Sparks wrote:
>Hi,
>
>I want to produce a home-page on my site using a URL like :
>
>http://www.zope.org/Members/Fred
>
>
>I'm a little confused as to how I would go about this in a dynamic way
where
>I would pull the contents of the page out of a database.
>
>A non-database way would be to :
>
>/Members (folder)
>/Fred (sub-folder or Document)
>/Jim (sub-folder or Document)
>/Jane (sub-folder or Document)
>
>But I want to be able to generate the /Members/Fred page dynamically.
>
>The SQLMethod part I can do, its the structuring of the objects in the
>heriarchy which baffles me.
>
>Ideally I'd like to have a "Members" folder in /, as this reduces the
>clutter in /, but then how do I pick up the "Fred" part of the URL once I
>have traversed into the members folder and apply it as part of a SQLMethod?
>
>
>- Ian Sparks.

You can find a solution in the PTK-Source

* Philipp Dunkel ICQ# 60149094  *
* zReal Productions*
* meet me at DALNet chan #phidu*







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




[Zope] www.mysite.com/Members/

2000-06-05 Thread Ian Sparks

Hi,

I want to produce a home-page on my site using a URL like :

http://www.zope.org/Members/Fred


I'm a little confused as to how I would go about this in a dynamic way where
I would pull the contents of the page out of a database.

A non-database way would be to :

/Members (folder)
/Fred (sub-folder or Document)
/Jim (sub-folder or Document)
/Jane (sub-folder or Document)

But I want to be able to generate the /Members/Fred page dynamically.

The SQLMethod part I can do, its the structuring of the objects in the
heriarchy which baffles me.

Ideally I'd like to have a "Members" folder in /, as this reduces the
clutter in /, but then how do I pick up the "Fred" part of the URL once I
have traversed into the members folder and apply it as part of a SQLMethod?


- Ian Sparks.











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




Re: [Zope] Aquisition questions

2000-06-02 Thread Ian Sparks


Shane, your idea about extending the URL and putting in an extra folder in
the path will work but its a bit of a fix rather than a solution. Right now
this isn't a RealLife(TM) problem for me, just part of my trying to get to
grips with Zope and its potential pitfalls.

>>
Isn't there a way to cause the SQLMethods to provide "UserRowID" and
"FlavorRowID" instead?  That would be the most logical solution.
<<

Again, this is a good idea but it doesn't solve the fundamental problem
which is that URL's are meant to be traversed in a particular way, if the
"clever" user traverses them in a different way than intended you *could*
end up in a mess.

- Ian.


- Original Message -
From: "Shane Hathaway" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 02, 2000 3:40 PM
Subject: Re: [Zope] Aquisition questions


Ian Sparks wrote:
> Is there a way to enforce URL's be traversed in a set way? Thus making :
>
> mysite.com/Users/Fred/Flavor/Cherry/test
>
> valid while mysite.com/Flavor/Cherry/Users/Fred/test becomes invalid.

You could set up an object called "Users" that would be found only if
the user goes through "Flavor" first.  Your example will have to be
modified to get it to work.

should work: mysite.com/Users/Fred/FlavorFolder/Flavor/Cherry/test

should not work: mysite.com/FlavorFolder/Flavor/Cherry/Users/Fred/test

FlavorFolder is a folder at the same level as Users.  It contains an SQL
query called Flavor and an object called Users.  The Users object in
this folder raises an exception, telling the clever user to back off.

Just a possibility.

> Also, assuming that both SQLMethods provide a "RowID", how do I specify
> explicitly which one I want, in OO terms :
>
> Users.RowID or Flavor.RowID

Isn't there a way to cause the SQLMethods to provide "UserRowID" and
"FlavorRowID" instead?  That would be the most logical solution.

Shane

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





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




[Zope] Aquisition questions

2000-06-02 Thread Ian Sparks

Some time back I had an exchange with Mike Pelletier regarding SQL methods
and aquisition.

We talked about a URL structure :

mysite.com/Users/Fred/Flavor/Cherry/test

Users is a SQL method which takes a single parameter (value = Fred here).

Flavor is another method which takes a single parameters (value = Cherry
here).

test is a dhtml method which returns values pulled from the SQL methods.

I set this test up and it works fine.

One of the effects of aquisition is that the URLs :

mysite.com/Users/Fred/Flavor/Cherry/test
mysite.com/Flavor/Cherry/Users/Fred/test

are functionally identical in my simple DHTML test method but they might not
be, for instance if both SQLMethods provided a result column "RowID" then
 would contain the ID of whichever SQL method was run last.
Suddenly I'm getting a Users RowID when I expected a Flavor RowID.
Potentially disasterous.

Is there a way to enforce URL's be traversed in a set way? Thus making :

mysite.com/Users/Fred/Flavor/Cherry/test

valid while mysite.com/Flavor/Cherry/Users/Fred/test becomes invalid.

Also, assuming that both SQLMethods provide a "RowID", how do I specify
explicitly which one I want, in OO terms :

Users.RowID or Flavor.RowID

All help appreciated.

- Ian Sparks.












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




Re: [Zope] Interbase / Cacheing - A thought

2000-06-01 Thread Ian Sparks


Hannu,

Does PostgresSQL allow you to have dynamic events? By this I mean can you do
things like :

PostEvent "Update_tblUsers_Record_" + new.RecordID;

I believe that in Interbase the events are compiled into the trigger, not
interpreted at Runtime so you can't have an Interbase event alert you to a
change in a particular record, only that a change has occurred on a table.

Coming from a RDBMS background myself I'd prefer to see RDBMS integration be
tighter to Zope - properties etc being stored in the database where
appropriate. For reasons of speed you don't want to have to go to the DB
each time you want a property but having a data-aware object which knows
when to update itself would solve this problem nicely.

It should also help with load-balancing and failover where you could have a
cluster of Zope instances all working on the same monster DB, all being kept
in sync. via the event alerter mechanism.

Just my thoughts.

- Ian.


- Original Message -
From: "Hannu Krosing" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 01, 2000 11:28 AM
Subject: Re: [Zope] Interbase / Cacheing - A thought


Ian Sparks wrote:
>
> Had a thought that I wanted to share.
>
> Interbase has a feature known as "event alerts". In a trigger you can post
> "events" which are just fixed data strings e.g. "DataAdded" or
> "Insert_tblUsers".

PostgreSQL has them too.

It's not (afaik) supported by DB-API, but could be used in a DA that talks
to some lower level API.

> A client database connection can register to listen to these events.
>
> I don't know if any Zopeish Interbase access method supports this (ODBC
> doesn't to my knowledge) but it would be incredibly useful for synching
> cached database objects. Zope could hold a representation of the table
data
> in cached objects for quick access. Each object could have one or more
> "event" methods which related to a database event. When the database
adaptor
> received an event message from Interbase it could inform all objects with
a
> matching event method (these methods would refresh their cached data with
> current values from the database).
>
> In this way database and Zope cache could be synced *without* having to
poll
> the database at an interval. In all, a very efficient mechanism.
>
> Just an idea I wanted to put out there.

Thanks for getting it out.

I have been contemplating the same for PostgreSQL but have been too lazy to
do
it myself ;)

--
Hannu

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





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




[Zope] Interbase / Cacheing - A thought

2000-06-01 Thread Ian Sparks

Had a thought that I wanted to share.

Interbase has a feature known as "event alerts". In a trigger you can post
"events" which are just fixed data strings e.g. "DataAdded" or
"Insert_tblUsers".

A client database connection can register to listen to these events.

I don't know if any Zopeish Interbase access method supports this (ODBC
doesn't to my knowledge) but it would be incredibly useful for synching
cached database objects. Zope could hold a representation of the table data
in cached objects for quick access. Each object could have one or more
"event" methods which related to a database event. When the database adaptor
received an event message from Interbase it could inform all objects with a
matching event method (these methods would refresh their cached data with
current values from the database).

In this way database and Zope cache could be synced *without* having to poll
the database at an interval. In all, a very efficient mechanism.

Just an idea I wanted to put out there.

- Ian Sparks.


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




[Zope] Linking to Mailing List Managers

2000-06-01 Thread Ian Sparks

Hi,

With all the talk about Syndication I started to think about linking with
mailing list managers.

Ideally I'd like members of my portal site to be given a free email address
@, bouncing all mail to that address to their real email
address.

In a roles-based membership scheme it would also be nice to be able to send
email to @, so the email goes to all members with that role.

Has anyone done anything like this, linking to an existing Mailing List
Manager like Majordomo from Zope? I want to manage the whole thing through
some Zope management pages.

- Ian Sparks.


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