Re: [Zope-dev] Xron and security

2000-08-23 Thread Steve Alexander

Loren Stafford wrote:
 
 Thanks, Steve.
 
 I have few questions below  8-) (I'm always better with questions than
 answers.)
 
 -- Loren
 
 From: "Steve Alexander" [EMAIL PROTECTED]
  Hi Loren,
 
   I'd be glad to listen to well considered proposals for how Xron should
   handle security.
 
  Consider this a "straw man".
 
 
  On installation, Xron creates a user in the root user folder called
  "XronUser".
 
  Xron is resonsible for setting this user's password. Therefore, it is
  known to both the Xron product, and also to the root user folder.
 
  When a Xron method is run, there is a property that indicates whether it
  is called anonymously, or authenticated as XronUser.
 
 Is there a good reason not to always pass authentication in the request? The
 authentication property would have to be stored in the Schedule catalog, and
 I'd like to keep the Schedule as small as possible.

I can't think of a concrete example of when I'd want to have a Xron
method called with no authentication, when authentication is available.

XronUser would be a privilaged user, and it might be useful to run
scheduled methods without using that privilage. However, in the 2.2
security model, you can drop privilage using proxy roles, so I don't
think your suggestion above is a limitation.

So, no, I can't see a good reason not to always pass authentication in
the request.


  The Xron product could change the password of XronUser every day to a
  new random value.
 
 That's more than folks do to maintain secrecy of the "superuser" password.
 Is the extra trouble worthwhile?

I put this in as an example to illustrate that only the Xron product,
and the Zope root user folder need to know the XronUser password. You're
right, it really doesn't need to change every day :-)

However, there should be manage_... method in Xron that will change the
password to a new random value. Then, if people wanted the password
changed every day, they could use a Xron DTML Method to do it :-)

Perhaps also a button somewhere in the Xron product, or in the Schedule,
to call the manage_resetXronPassword method.

  The domains associated with XronUser could be just localhost.localdomain
  (not sure about this). Or based on whatever the machine's host-name is
  (probably better).
 
 At a virtual-hosted site, how could Xron know what the host-name is?

Xron must know (in some sense) what the host name is now, in order to
use ZClient to call a Xron DTML Method. I guess this is because the URL
to use comes from absolute_url() in Zope.

I'm using Xron 0.0.9 on a virtual-hosted site, and it works.

However, restricting a User's domains doesn't work as I would expect.

The configuration is ZServer behind Apache+ProxyPass. If I put any value
in the "domains" field of a User, other than "127.0.0.1", that User
cannot log in at all. I haven't looked into this particularly yet.


In AccessControl/User.py, login restriction by domain works using
REMOTE_HOST and REMOTE_ADDR from the REQUEST.

I sent myself an email from a Xron DTML Method on two Zope 2.2.1b1
machines, one just running ZServer, the other virtual-hosted as
described above.

In the case of the virtual-hosted server, I get emailed REMOTE_ADDR
127.0.0.1

In the case of the bare ZServer, I get emailed REMOTE_ADDR
my_server's_ip_address

Also, for the virtual server, ZClient seems to choose an appropriate
HTTP_HOST.


So, it seems that the correct domain restriction to use depends on just
how you're using ZServer.

I can think of three ways around this:

  1: Don't bother restricting by domain for XronUser.

  2: Allow a Manager to configure what domains XronUser may log in from.

  3: Use ZClient to call a method in Xron. Xron inspects the REQUEST
passed
 for this method, extracts the REMOTE_ADDR and REMOTE_HOST, and uses
 one of these as the domain restriction.

If you go with 3, there will need to be some button in Xron's management
interface to re-determine the correct domain to use.

If I were writing the software, I'd choose 2, and let the Manager of a
site make the decision.

--
Steve Alexander
Software Engineer
Cat-Box ltd
http://www.cat-box.net

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




[Zope-dev] Logs stamped with wrong time

2000-08-23 Thread Steve Alexander

Zope 2.2 CVS checkout August 21.

I'm in the BST timezone, which is GMT+1.

All the entries in Z2.log are one hour behind where they should be.

127.0.0.1: - - [23/Aug/2000:15:15:39 +0100] "POST
/fmr/mail_test/manage_edit HTTP/1.0" 200 10139
"http://zope.cat-box.net/fmr/mail_test/manage_main" "Mozilla/4.61 [en]
(WinNT; I)"

I was watching this in the log using "tail -f", and the time was 16:15
BST.


I also checked the time on the machine: 
$ date
Wed Aug 23 16:15:42 BST 2000

Something awry in the time formatting in ZServer/medusa/http_server.py

Line 260:

def log_date_string (self, when):
return time.strftime (
'%d/%b/%Y:%H:%M:%S ',
time.gmtime(when)
) + tz_for_log


This looks wrong -- it is formatting the time for GMT, but adding on a
spurious timezone to the end. I guess time.gmtime should become
time.localtime.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope-dev] Logs stamped with wrong time

2000-08-23 Thread Steve Alexander

I've put this in the Collector:

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

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope-dev] problems

2000-08-23 Thread Sarciaux, Fabrice

hello

i recently came accross zope and decided to give it a try

installation went fine
when asked to start zope as a nt service, i answered yes
and check through the controlpanel-services that it was in fact up and
running

then, i used a bowser (ie) to go to http://localhost:8080/manage
but was left whith the following text:

Not Found 

i decided to stop the service and to start zope manually
i doubled clicked on start.bat and went back to the browser

for some reason, going to http://localhost:8080/manage
frooze the browser and the only thing left for me to do was to kill
start.bat


i am running win2000

please let me know what i might doing wrong or where could i get information
above the above problem?

thanks
fabrice

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




[Zope-dev] Fw: [Zope] copy / paste support

2000-08-23 Thread Andy McKay

I know some people have helped me on this thread before but Ive had chance
to look at this again and Im still stumped on this.

Newly created 2.2 objects still have a problem. Using custom class in Zope
2.2.0.

 Thanks.

 - Original Message -
 From: "Andy McKay" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2000 11:05 AM
 Subject: [Zope] copy / paste support


  When trying to copy an item I get the following item on paste:
 
  One or more items referred to in the clipboard data was not found. The
 item
  may have been moved or deleted after you copied it.
 
  This is a custom python class which is catalogued. Ive no idea why this
is
  happening. Any ideas?
 
  --
   Andy McKay, Developer, ActiveState
   http://www.ActiveState.com
   Programming for the People
 
 
  ___
  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-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Product creation question

2000-08-23 Thread Daniel Rusch


I've created a product called BasicDocument. I've installed it and it works
great.
I've also created a folderish product. Installed. When a user selects
that product from the
available objects list, thus creating an instance of that product,
they have an option to
create sub folders which contain objects like dtml documents,
dtml methods, and my BasicDocument product
(very similar to what happens when you instantiate a folder object,
you can have a dtml method created in the new folder).

I am able to have the manage_addSimpleSite function to create DTMLDocument,
DTMLMethod and Folder objects but I am unable to have the function create
BasicDocuments (which live in the Products directory) additionally, I am
unbale to it create any Products from the Products directory,
such as Local File System?

The code below works great, I get a dtml document, two folders
each with a dtml method in them

HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM
THE
PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION???
ob.manage_addBasicDocument(id='index_html', title='')
-- THISLINESGENERATESANERROR:
AttributeError: manage_addBasicDocument
ref the code below.
Please reply all if you are responding from the dev list
as I usually don't monitor the dev list.
Thanks,
Dan

def manage_addSimpleSite(self, id, title='',

createNewFolder=0,

createEditFolder=0,

REQUEST=None):
 """Add a new SimpleSite object with id *id*.

 If the 'createNewFolder' and 'createEditFolder'
parameters are set
to any true
 value, an 'New sub Folder' and an 'edit sub
Folder' objects are
created respectively
 in the new SimpleSite.
 """
 ob=SimpleSite()
 ob.id=id
 ob.title=title
 self._setObject(id, ob)
try: user=REQUEST['AUTHENTICATED_USER']
 except: user=None
 ob.manage_addBasicDocument(id='index_html',
title='') -- THISLINESGENERATESANERROR:
AttributeError: manage_addBasicDocument
 ob.manage_addDTMLDocument(id='index_html',
title='')
 if createNewFolder:
 if (user is not None)
and not (

user.has_permission('Add User SimpleSites', self)):

raise 'Unauthorized', (

'You are not authorized to add User SimpleSites.'

)
 ob.manage_addFolder(id='New'+id,
title='', createPublic=1)
 if createEditFolder:
 if (user is not None)
and not (

user.has_permission('Add Documents, Images, and Files',
self)):

raise 'Unauthorized', (

'You are not authorized to add DTML Documents.'

)
 ob.manage_addFolder(id='Edit'+id,
title='', createPublic=1)
 if REQUEST is not None:
 return self.manage_main(self,
REQUEST, update_menu=1


Re: [Zope] Barcodes, magnetic cards, etc.

2000-08-23 Thread Kapil Thangavelu

Erik Enge wrote:
 
 Good morning, people.
 
 I was wondering, can Zope interface to barcodes, magnetic cards
 (e.g. credit cards) and other common shop-"accessories"?
 
 Feedback is greatly appretiated :)
 

zope is a great integration platform. anything you can touch in python
either through natively, swigged(www.swig.org), or just plain old
intefaced(piped shell call, xml-rpc, etc) you can play with in zope.


kapil

___
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] Indirect method lookup? (Update)

2000-08-23 Thread Kapil Thangavelu

Jeff Hoffman wrote:
 
 Ok, knowing more about what's going on, now, I figured I would send an
 update to the list and hope it jars someone's memory.
 
 Here's what I am trying to do:
 
 I have a ZClass, MyTestClass. MyTestClass has two methods: method1, and
 method2. There are two other methods, showMethods and showMethods2, but
 they are only needed for the purpose of demonstration.
 
 I created an instance of MyTestClass with an id of 'test'.
d 
 showMethods (a DTMLMethod) is defined as:
 
   dtml-var standard_html_header
   p
   method1 = dtml-var "_.hasattr(this(), 'method1')"br
   method2 = dtml-var "_.hasattr(this(), 'method2')"br
   nullmethod = dtml-var "_.hasattr(this(), 'nullmethod')"
   /p
 
   dtml-var standard_html_footer
 
 and, when invoked on my 'test' instance, returns:
 
   method1 = 1
   method2 = 1
   nullmethod = 0
 
 We're cookin'. Now, I need to get the same results with a PythonMethod.
 showMethods2 (a PythonMethod) is defined as:
 
   print _.hasattr(self, 'method1')
   print _.hasattr(self, 'method2')
   print _.hasattr(self, 'nullmethod')
   return printed
 
 which, when invoked on my 'test' instance, returns:
 
   0
   0
   0
 
 I have tried every permutation of Python code I can, and none work as the
 DTML Method does. Somebody? Anybody? :-)


hmmm... what are the args to the method and how are you calling it? from
your spelling i assume you mean a web PythonMethod..


if your zclass is an objectmanager why not
dtml-var "'method1' in self.objectIds(['DTML Methods'])"


anyways, i tried your example and it worked fine for me. i tried it with
a zclass whose only base class was dtml doc.

my pythonmethod 
accepted the object as an arg.

body
return hasattr(ob, 'method1')

returned the correct results. 1


Kapil

___
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] Barcodes, magnetic cards, etc.

2000-08-23 Thread Curtis Maloney

On Wed, 23 Aug 2000, Erik Enge wrote:
 Good morning, people.

 I was wondering, can Zope interface to barcodes, magnetic cards
 (e.g. credit cards) and other common shop-"accessories"?

Well, I have used Zope with a Barcode scanner.  Since the scanner (as do 
most) work via the keyboard, AS a keyboard, there is really nothing special 
to do.

We did include some JavaScript to make the focus change when ENTER is hit, 
since the scanner sends that at then end of a scan.

input type="text" name="name" onKeyUp="if (event.which == 13) { 
document.forms[0].NextField.focus(); }"

 Feedback is greatly appretiated :)


From what I can find (working for a company that sells barcode and mag stripe 
scanners) you should have little trouble finding either that will interface 
as a keyboard.

Have a better one,
Curtis Maloney

dtml-var standard_work_disclaimer

___
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] Yihaw on 2.2.1b1, boolean properties

2000-08-23 Thread Wolfgang Strobl

On 22 Aug 00, at 22:15, R. David Murray wrote:

 On Tue, 22 Aug 2000, Wolfgang Strobl wrote:
  9. Uncheck "Highlight" and push Save Changes.
  
  Result: The boolean Highlight property checkbox is still checked. 
  There is no way of making it unchecked, again.
 
 This *sounds* like the boolean property bug that appeared in 2.2 (I
 think) and was supposedly fixed in 2.2.1.

Well, I think I had the very same behaviour on 2.1.6. Anyway, I 
tried it on an old 2.1.2 server which still awaits upgrading, and, 
indeed, here those boolean properties work..

 
 By any chance does Yihaw use manage_changeProperties instead of
 manage_editProperties in its propertysheet edit method?  

I already checked this, and no, it doesn't.

But I prefer pure Python and so don't claim knowing much about 
Zclasses.

In

/Control_Panel / Products / YihawDirectory / YihawChannel / 
propertysheets / methods / YihawBase / propertysheets / 
methods / manage_baseproperties 

it says

  input type="submit" name="manage_editProperties:method" 

for the boolean properties in question.


That would
 lead to the observed behavior since unchecked boolean check
 boxes do not appear in REQUEST and thus are not affected by
 a manage_changeProperties call.

Sure. In seems to have a different cause in this case, though.

Any other ideas what to look out for? I think I'll just wait for 2.2.1  
final to arrive  ...

Thanks!

-- 
Wolfgang Strobl


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




Re: [Zope] Barcodes, magnetic cards, etc.

2000-08-23 Thread Erik Enge

[Curtis Maloney]

| Well, I have used Zope with a Barcode scanner.  Since the scanner
| (as do most) work via the keyboard, AS a keyboard, there is really
| nothing special to do.

Ok, so it translates the barcodes to a string or what?

Which scanner was this?  Product, model type, etc.
 
| From what I can find (working for a company that sells barcode and
| mag stripe scanners) you should have little trouble finding either
| that will interface as a keyboard.

What is the mainstream format for the codes when the are scanned in?
 
| Have a better one,

I will - you too :)

___
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] Barcodes, magnetic cards, etc.

2000-08-23 Thread Curtis Maloney

On Wed, 23 Aug 2000, Erik Enge wrote:
 [Curtis Maloney]

 | Well, I have used Zope with a Barcode scanner.  Since the scanner
 | (as do most) work via the keyboard, AS a keyboard, there is really
 | nothing special to do.

 Ok, so it translates the barcodes to a string or what?

No, it types the barcode, as if it were a keyboard.  MOST barcode scanners 
I've encountered (Intermech, Symbol, various others) plug into AT or PS/2 
keyboard ports, and act exactly as keyboards.


 Which scanner was this?  Product, model type, etc.

Check out http://www.umd.com.au/contents.html


 | From what I can find (working for a company that sells barcode and
 | mag stripe scanners) you should have little trouble finding either
 | that will interface as a keyboard.

 What is the mainstream format for the codes when the are scanned in?

I don't understand what you mean.

 | Have a better one,

 I will - you too :)

Curtis.

___
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] Barcodes, magnetic cards, etc.

2000-08-23 Thread Curtis Maloney

On Wed, 23 Aug 2000, Erik Enge wrote:
 [Kapil Thangavelu]

 | zope is a great integration platform. anything you can touch in python
 | either through natively,

 Is there a repository or somesuch where I would find a more complete
 index of all devices Python can interface to?


Well, you could start at http://www.python.org  and go from there.  Try the 
search link.

Their link to Vaults of Parnassus is good, too. http://www.vex.net/parnassus/

Curtis.

___
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] Barcodes, magnetic cards, etc.

2000-08-23 Thread Erik Enge

[Curtis Maloney]

| On Wed, 23 Aug 2000, Erik Enge wrote:
|  What is the mainstream format for the codes when the are scanned in?
| 
| I don't understand what you mean.

Are the barcodes usually a collection of integers, characters, special
characters or what?

And, by the way, do you know if there exist a magnetic card scanner
that plugs in to the PS/2?  And if yes, which information would get
from such a card?  Just a number, or are there other possibilities?

Thanks.

___
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] Yihaw on 2.2.1b1, boolean properties

2000-08-23 Thread Wolfgang Strobl

On 22 Aug 2000, 22:15  R. David Murray wrote:

 On Tue, 22 Aug 2000, Wolfgang Strobl wrote:
  9. Uncheck "Highlight" and push Save Changes.
  
  Result: The boolean Highlight property checkbox is still checked.
  There is no way of making it unchecked, again.
 
 This *sounds* like the boolean property bug that appeared in 2.2 (I
 think) and was supposedly fixed in 2.2.1.

(The story continues)

I just installed an actual version of Yihaw into a cvs version of zope, 
and it seems that this solved the problem. 

Thanks!

Speaking about cvs: How do you people out there who run Zope on 
Windows too, do install cvs versions of zope?  I do it simply by 
using the latest installer (i.e. Zope-2.2.1b1-win32-x86.exe, 
currently) for creating a local installation, and copy an actual cvs 
checkout into the destination directory, afterwards, using the 
robocopy.exe utility from the nt4 resource kit (it works great on 
win2000, too).

Is there perhaps a better way for installing a cvs checkout on 
windows? It's obvious that none of the c modules get compiled, but 
these seem to change rather rarely ...



--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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] mailhosts and mail server speed

2000-08-23 Thread Matt Hoskins


 Note that if you set up sendmail on a local box, make sure it either
 handballs stuff off to a smarthost straight away, or you have stuff
 set up to check for sendmail getting upset and just queuing messages
 for ever. Normally you'd notice breakages on your mail server - but
 your web server might be a different matter entirely.

I've already dropped chris a mail about the issue. We run exim on our
main mailservers with the configuration such that it verifies envelope
addresses as much as it can (checks the domain exists for remote
addresses). This is likely to cause speed issues, and for mass mailing
or quick mailing from internal hosts it's better to have a different
copy set up to handle the mail (it can even be on the same server, just
on a different port with a different config, assuming the mail send
class being used allows you to specify an alternate port). There are
other config parameters to tweak if large amounts of mail are going to
churn through it to optimise for speed and parallel delivery (if you
queue mail and then send every 15 minutes, you can take advantage of the
fact exim will batch mails if it detects they can go down the same SMTP
connection). Where it's a forking mail server, if you are going to hit
it lots, there's options to configure the limit on accepted
connections/forked copies to stop the mail server grinding to a halt.

Matt

___
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] Permissions / roles question

2000-08-23 Thread Jean Jordaan

Hi RDM

 Actually, in at least some versions of GUF, all users also 
 have the Anonymous role.

Not in mine (from '/docs/acl_users/userRoles')::

  dtml-comment njj: from the Readme: 

  "Don't force Anonymous role for users - it isn't needed?"

  I certainly hope it isn't. At present my users are both
  'ZWikiUsers' and 'Anonymous', for example, and that makes 
  no sense.

Anonymous

  /dtml-comment

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] PYTHONPATH issue .. import failing

2000-08-23 Thread Jean Jordaan

Hi Zopers

When installing the 'jcNTUserFolder' product, I now get a broken
product in the Control Panel, and the following traceback::

  jcNTUserFolder Import Traceback
  Traceback (innermost last):
File "C:\programs\ZopeDev\lib\python\OFS\Application.py", line 387, in
import_products
  product=__import__(pname, global_dict, global_dict, silly)
File
"C:\programs\ZopeDev\lib\python\Products\jcNTUserFolder\__init__.py", line
1, in ?
  import NTUserFolder
File
"C:\programs\ZopeDev\lib\python\Products\jcNTUserFolder\NTUserFolder.py",
line 9, in ?
  import win32net, win32netcon
  ImportError: DLL load failed: The specified procedure could not be found.

My PYTHONPATH is set as follows::

   echo $PYTHONPATH
  C:\programs\ZopeDev\bin

The importing code in 
'C:\programs\ZopeDev\lib\python\Products\jcNTUserFolder\NTUserFolder.py'
looks like::

  import win32api
  import win32net, win32netcon
  import win32security

The files to be imported seem to be::

  C:\programs\ZopeDev\bin\lib\win32\win32api.pyd
  C:\programs\ZopeDev\bin\lib\win32\win32net.pyd
  C:\programs\ZopeDev\bin\lib\win32\lib\win32con.py

So why is 'win32api' found and the other two not found? 

The Python API ref has: "For instance, if the Python executable 
is found in "/usr/local/bin/python", it will assume that the 
libraries are in "/usr/local/lib/python1.5". (In fact, this 
particular path is also the ``fallback'' location, used when 
no executable file named "python" is found along $PATH.) The 
user can override this behavior by setting the environment 
variable $PYTHONHOME, or insert additional directories in 
front of the standard path by setting $PYTHONPATH. 

The Zope install has no 'lib/pythonN.M' directory -- so along 
what path are imports searched for then?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] Corruption caused by 'Pack'?

2000-08-23 Thread Marcin Kasperski

After using succesfully zope for some time I decided to cut a bit the
database size. So I went to Control Panel/Database and clicked "Pack"
for objects older than 10 days. At first everything seemed to work (I
returned to the management screen seeing new - smaller - Data.fs size),
but when I tried to preview my pages, terrible things happened - most
pages turned to be not available, instead of seeing them I saw zope
errors with useless descriptions like 'Zope error: error' etc
(restarting browser and zope did not helped).

Happily, during the process, the Data.fs.old file was created - stopping
Zope, removing all Data.fs.sth and overwritting Data.fs with
Data.fs.old returned zope instance to the previous state. So I will not
click 'Pack' anymore.

Has anyone notified similar problems? What could be going on?

I use binary zope 2.2.0 distribution for Linux. The database has been
created and always used with this distribution (just a few weeks ago)
and has never been packed. The time on the machine seem to be correct
(although IIRC there happened a moment a few weeks ago when it was for
the short time incorrect). I use some custom ZClasses installed as a
product developed within 'this' Control Panel/Products.

By the way: to decrease database size I consider:
- creating new Data.fs served via another (temporary) Zope instance (via
just copying Data.fs.in)
- exporting everything important from my current instance
- importing those files into new instance
- copying new Data.fs over the old one
(of course each Data.fs copying is performed while both Zope's are shut
down).
Will it work as expected? Will I loose anything apart
bobobase_modification_time?

-- Serwis dla programistw z kcikiem mieszkaniowym: http://www.mk.w.pl 
|
| You have the right to change your mind, to substitute functionality,  
| and to change priorities. (Ken Beck's Third Customer Right)   
|

___
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] Hi guys, I'm looking for the Vignette's SDK documentation

2000-08-23 Thread Sylvain Legrand



















Re: [Zope] Hi guys, I'm looking for the Vignette's SDK documentation

2000-08-23 Thread Phil Harris



Try ringing vignette then, eh!

  - Original Message - 
  From: 
  Sylvain Legrand 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, August 23, 2000 12:44 
  PM
  Subject: [Zope] Hi guys, I'm looking for 
  the Vignette's SDK documentation
  
  
  
  


[Zope] Including a method returning batches inside a page.

2000-08-23 Thread Jean Jordaan

Hi all

In my 'index_html', I have::

  dtml-var docsByTitle

This is supposed to return batches of documents, similarly to
http://www.zope.org/Products/ [1]. It works halfway, but the links
to previous and next batches of course refer to 'docsByTitle'
and not to 'index_html'::

  a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var
next-sequence-start-number"

I could include the looping code in 'index_html' (like [1] does),
but that isn't pretty -- and besides, I'd like to be able to choose
between 'docsByTitle', 'docsByOrigin', 'docsBySeries', etc. Is the 
best way to do this to carry the relevant variable ('sequence-query',
'next-sequence-start-number' back and forth between 'index_html' 
and 'docsByTitle' in the REQUEST? How would you tackle this?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] Including a method returning batches inside a page.

2000-08-23 Thread Phil Harris

Is docsByTitle a DTML Document?

If so then try making it a DTML Method.

It seems to be taking the properties from itself rather than it's container,
if yu see what I mean.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Jean Jordaan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 1:11 PM
Subject: [Zope] Including a method returning batches inside a page.


 Hi all

 In my 'index_html', I have::

   dtml-var docsByTitle

 This is supposed to return batches of documents, similarly to
 http://www.zope.org/Products/ [1]. It works halfway, but the links
 to previous and next batches of course refer to 'docsByTitle'
 and not to 'index_html'::

   a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var
 next-sequence-start-number"

 I could include the looping code in 'index_html' (like [1] does),
 but that isn't pretty -- and besides, I'd like to be able to choose
 between 'docsByTitle', 'docsByOrigin', 'docsBySeries', etc. Is the
 best way to do this to carry the relevant variable ('sequence-query',
 'next-sequence-start-number' back and forth between 'index_html'
 and 'docsByTitle' in the REQUEST? How would you tackle this?

 --
 Jean Jordaan   --technical writer--
 Mosaic Software--Zope 2.1.6 on WinNT and W2K

 ___
 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] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Darin Lee

Zopistas,

Is it possible to access an ODBC data source through Zope running under Linux? I have 
perused the literature, and it appears the Zope DA's for ODBC only run under the Win32 
environment.

I would very much like to setup ZAP (for many reasons), but our "organizational 
standard" is MS SQL Server 6.5.

Thanks,
-Darin Lee




Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]

Darin M. Lee 
Analyst / Web Administrator
Office of Automation Coordination
Michigan Department of Environmental Quality
Phone: 517.241.5214
[EMAIL PROTECTED]


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




RE: [Zope] Including a method returning batches inside a page.

2000-08-23 Thread Jean Jordaan

Hi Phil

 Is docsByTitle a DTML Document?

It's a Method alright -- cutting straight off the screen::

  DTML Method at /docs / docsByTitle

and 'index_html' is::

  DTML Document at /docs / index_html

   a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var
 next-sequence-start-number"

Hmm, it sounds like you expected 'document_id' to refer to
'index_html' instead of to 'docsByTitle'. That sets me thinking.
Hmm! It works exactly that way if you replace 'document_id' 
with 'id'! Does this break anything?::

a href="dtml-var iddtml-var sequence-queryqs=dtml-var
next-sequence-start-number"

Thanks!
-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Anthony Baxter


Use Sybase. Sybase even provide the client libs for download for
*ahem* evaluation. 

MS SQL == Sybase wearing a pair of bad Groucho Marx glasses/nose/mustache
  (aka an annoying management GUI)

Or FreeTDS, but last time I looked that wasn't threadsafe.

Anthony

 "Darin Lee" wrote
 Zopistas,
 
 Is it possible to access an ODBC data source through Zope running under Linux
? I have perused the literature, and it appears the Zope DA's for ODBC only run
 under the Win32 environment.
 
 I would very much like to setup ZAP (for many reasons), but our "organization
al standard" is MS SQL Server 6.5.
 
 Thanks,
 -Darin Lee
 
 
 
 
 Darin M. Lee 
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]
 
 Darin M. Lee 
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

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




Re: [Zope] compiling on windows

2000-08-23 Thread Toby Dickenson

On Wed, 23 Aug 2000 10:49:15 +0200, "Wolfgang Strobl" [EMAIL PROTECTED]
wrote:

Speaking about cvs: How do you people out there who run Zope on 
Windows too, do install cvs versions of zope?  I do it simply by 
using the latest installer (i.e. Zope-2.2.1b1-win32-x86.exe, 
currently) for creating a local installation, and copy an actual cvs 
checkout into the destination directory, afterwards, using the 
robocopy.exe utility from the nt4 resource kit (it works great on 
win2000, too).

Is there perhaps a better way for installing a cvs checkout on 
windows? It's obvious that none of the c modules get compiled, but 
these seem to change rather rarely ...

I cant think of a better way if you don't have the compiler to hand.


Toby Dickenson
[EMAIL PROTECTED]

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




Re: [Zope] compiling on windows

2000-08-23 Thread Wolfgang Strobl

On 23 Aug 2000, 14:21  Toby Dickenson wrote:

 On Wed, 23 Aug 2000 10:49:15 +0200, "Wolfgang Strobl" [EMAIL PROTECTED]
 wrote:
 
 Speaking about cvs: How do you people out there who run Zope on
 Windows too, do install cvs versions of zope?  I do it simply by
 using the latest installer (i.e. Zope-2.2.1b1-win32-x86.exe,
 currently) for creating a local installation, and copy an actual cvs
 checkout into the destination directory, afterwards, using the
 robocopy.exe utility from the nt4 resource kit (it works great on
 win2000, too).
 
 Is there perhaps a better way for installing a cvs checkout on 
 windows? It's obvious that none of the c modules get compiled, but
 these seem to change rather rarely ...
 
 I cant think of a better way if you don't have the compiler to hand.

Well, actually I have. But there aren't any workspace and project 
files (*.dsw and *.dsp). I guess the build environment for Windows 
(most probably a somewhat modifie Python src dist) isn't part of 
the cvs tree.


--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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 test if an object exist

2000-08-23 Thread Francois-Regis CHALAOUX

Hi,

In the following code I test if a folder exists. The folder name to test is
generated on the fly and here I try to simultate it with 'exce' function (may
my error). The first time object2create does not exist and object2create is
well created but if run again the script I obtain the following error :

Errot Type: NameError
Error Value: folder1

How to manage this problem ?

FR.

=
CODE
=
def testFolder(self):
self=self.this()
sub1=self.folder1
exec "object2create = 'folder11'"
try:
if sub1.object2create:
return 'Object exists'
except AttributeError:
sub1.manage_addFolder(object2create)
return 'Object created'

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

___
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 to test if an object exist

2000-08-23 Thread Phil Harris

def testFolder(self):
self=self.this()
if hasattr(self,'id of object to check for'):
  sub1=self.folder1
  exec "object2create = 'folder11'"
  try:
  if sub1.object2create:
  return 'Object exists'
  except AttributeError:
  sub1.manage_addFolder(object2create)
  return 'Object created'
else:
  print 'oops folder does not exist, bugger'

- Original Message -
From: "Francois-Regis CHALAOUX"
[EMAIL PROTECTED]
To: "Receipt Notification Requested" [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 2:51 PM
Subject: [Zope] How to test if an object exist


 Hi,

 In the following code I test if a folder exists. The folder name to test
is
 generated on the fly and here I try to simultate it with 'exce' function
(may
 my error). The first time object2create does not exist and object2create
is
 well created but if run again the script I obtain the following error :

 Errot Type: NameError
 Error Value: folder1

 How to manage this problem ?

 FR.

 =
 CODE
 =
 def testFolder(self):
 self=self.this()
 sub1=self.folder1
 exec "object2create = 'folder11'"
 try:
 if sub1.object2create:
 return 'Object exists'
 except AttributeError:
 sub1.manage_addFolder(object2create)
 return 'Object created'






















 ___
 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] dtml-let .. method /dtml-let

2000-08-23 Thread Phil Harris

untested

dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10  start=qs
sort=sort_key

/untested

???


- Original Message -
From: "Jean Jordaan" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: "RC Compaan (E-mail)" [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 2:52 PM
Subject: [Zope] dtml-let .. method /dtml-let


 Hi all

 The answer to my previous question makes this one occur to
 me: if dtml-var id in a method refers to the containing
 document's id, does 'myMethod' get to see 'myVariable'?::

   dtml-let myVariable='Beep'
 dtml-var myMethod
   /dtml-let

 Testing .. yes, it does! Cool. So why does this::

   dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10
   start=qs sort=dtml-var sort_key

 give::

   Invalid attribute name, "sort_key", for tag dtml-in
   "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs
   sort=dtml-var sort_key, on line 18 of docsByTitle

 How do I get 'sort_key' in there?

 --
 Jean Jordaan   --technical writer--
 Mosaic Software--Zope 2.1.6 on WinNT and W2K

 ___
 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] dtml-let .. method /dtml-let

2000-08-23 Thread Jean Jordaan

Hi all

The answer to my previous question makes this one occur to
me: if dtml-var id in a method refers to the containing
document's id, does 'myMethod' get to see 'myVariable'?::

  dtml-let myVariable='Beep'
dtml-var myMethod
  /dtml-let

Testing .. yes, it does! Cool. So why does this::

  dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10 
  start=qs sort=dtml-var sort_key

give::

  Invalid attribute name, "sort_key", for tag dtml-in 
  "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs 
  sort=dtml-var sort_key, on line 18 of docsByTitle

How do I get 'sort_key' in there?

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] Generic Workflow Products?

2000-08-23 Thread Kapil Thangavelu

Cary O'Brien wrote:
 
 After applying Zope to a couple of in-house projects
 (which turned out pretty well, thank you),  I've started
 to come to the realization that many applications boil
 down to workflow management.  A job comes in, attributes
 get set, things get attached to it, and it gets passed
 from person to person (to machine, in some cases)
 as it flows through the system.
 
 I guess to start out it would need the following:
 
 -- user classes
 -- job creation
 -- job attributes, with protection from view and modification
depending on user classes
 -- multiple job queues, with access control, and some sort
of priority.  Queues may end up being implemented simply
by having a job state, sequence number, and priority, and
moving from one queue to another would just be changing
the state.
 -- job timeouts for escalation,
 -- e-mail "ticklers" and notification
 -- job routing based on attributes and actions.
 -- some sort of api other then HTTP/HTML for external
programs to access jobs, perform actions, and update
jobs.
 -- Extra Credit:  Graphical workflow editor.
 -- (what else am I missing)
 
 Sounds like a job for Zope, doesn't it.  Basically I've
 implemented a couple of systems like this, either
 classic database-driven or z-class driven.  But I'm tired
 of re-inventing the wheel.  It would be nicer if systems
 like this could be implemented at the "workflow logic"
 level rather than the Zclass level.  IE a set of ZClasses
 or Product classes that implemented workflow systems.
 
 Is there such a thing? Has anyone worked on such a thing?
 Any ideas how to implement such a thing?
 
 I've got a couple of modifications to an existing system
 coming up, which sounds like just the excuse I need
 for a total rewrite :)
 

Check out some of the recent work on the PTK list, its building the
infrastructure you need to implement plugabble workflows.


Kapil

___
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] compiling on windows

2000-08-23 Thread Toby Dickenson

On Wed, 23 Aug 2000 15:47:36 +0200, "Wolfgang Strobl" [EMAIL PROTECTED]
wrote:

Well, actually I have. But there aren't any workspace and project 
files (*.dsw and *.dsp).

Hmmm, no. If you can wait, Ill send you the ones I use early next
week.

most probably a somewhat modifie Python src dist

Zope builds happily on a stock python 1.5.2 and the cvs versions of
2.0 too.


Toby Dickenson
[EMAIL PROTECTED]

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




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Phil Harris

I seem to remember a entry to the collector about this, I think your stuck
with having a 'static' sort key.

or you could do something like

dtml-if "sort_key=='sort1'"
  dtml-in ..
  /dtml-in
dtml-elif "sort_key=='sort2'"
 .
.
 .
dtml-else
 .
.
/dtml-if

If you see what I mean.

Phil

- Original Message -
From: "Jean Jordaan" [EMAIL PROTECTED]
To: "'Phil Harris'" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 23, 2000 3:45 PM
Subject: RE: [Zope] dtml-let .. method /dtml-let


 hi Phil

  ???

 nope ..

  sort=sort_key

 not "sort_key", "'sort_key'", or dtml-sort_key; either :(

 dtml-var sort_key works fine, outside the dtml-in ... tag

 --
 jean


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




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Adam Karpierz

 Phil Harris [EMAIL PROTECTED] wrote:
I seem to remember a entry to the collector about this

There is a patch for Zope 2.2.1b1:
http://classic.zope.org:8080/Collector/1542/view

Please for discussion about it.

Regards
--
Adam Karpierz
[EMAIL PROTECTED]




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




[Zope] Re. Generic Workflow Products?

2000-08-23 Thread Spicklemire, Jerry

Cary wrote:

 come to the realization that many applications boil
 down to workflow management.

The ZPatterns project the Phil Eby and Ty Sarna are running 
is intended to lay the groundwork for just what you want. 
They call it "SWARM", and if memory serves, the "W" is for 
"Workflow". ZPatterns has been incorporated into the next 
rev. of the Portal Tool Kit to some degree.

http://www.zope.org/Members/pje/Wikis/ZPatterns/HomePage

http://lists.zope.org/pipermail/zope-ptk/


The discussion below is from:
http://www.zope.org/Members/pje/Wikis/ZPatterns/SummarizedVersion

"   Other applications of ZPatterns

stevea: I'm using it to support a Product Line Infrastructure -- a bunch of
related applications that reuse bits of each other but in differnet
contexts. However, I've only got the first app so far :-)

JeffH?: We need to build a workflow system. We need to build a content
management system. We need to build a customer relationship management
system. I only want to build each one once. They must, at some point,
cooperate with each other depending on the context in which they are being
used.

roche: we also need to build a customer relationship system

rdmurray: We could probably use a community collaboration on a CRM project.

MrTopf?: wonders if he could use ZPatterns for his Groupware ideas..

SWARM

pje: ZPatterns is the basis for another system Ty and I will be building,
called SWARM... State-based Workflow And Resource Management So, it is
probably a good match for other workflow apps.

stevea: I've seen that acronym somewhere inthe Wiki I think. Will SWARM be
open source or verio internal?

pje: Open source.

tsarna: (pje and I are arguing as to weather propertysheets on users already
work or not... hold on :)

pje: The idea is that there will be Plans, which have Phases, Events, and
Roles. Then "ObjectsWithPlans" will use the plan as a kind of state-based
attribute provider. You can actually do state-based stuff now, using just
GAPs?.

jean: I'm champing at the bit to show off something like SWARM at work.
Stuff like Journyx and an inhouse issue tracker are being pushed, and I feel
they're steps backwards. We're going to have to zopify some anyway, better
to invest more in it, not disperse across other cruft."

To me ZPatterns and SWARM represent an even higher level of Zope development
that
will impact Zope Deployment similarly to the way Visual Basic changed
Windows Development. Watching this take shape is kind of like knowing about
the Normandy Invasion about six months ahead of time.

Later,
Jerry 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] newbiz : zope connection

2000-08-23 Thread kguesnet



Hi zopeur !

I want to know how many people are connected on my zope server, and who are they, has anybody an idea to see this sort of information ?

thks a lot !

David Sergent
A french newbiz !


RE: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Jean Jordaan

Hi Phil, RDM, Adam

 I seem to remember a entry to the collector about this, 
 I think your stuck with having a 'static' sort key.

yeech!

 or you could do something like

 dtml-if "sort_key=='sort1'"

that'll do as a workaround .. 

 You can always you his patch in the meantime, though.

I'm too chary of living on the bleeding edge .. 

Now I'm trying to do::

  dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10 start=qs
   dtml-var reverse
   sort=title

but this won't work either::

  Document Template Parse Error
  Invalid attribute name, "

Thanks for the answers!
-- 
jean

___
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] strange zope problems of the crashing kind

2000-08-23 Thread Leichtman, David J


Alright Zopers, I'm looking for a hint, a suggestion, just about anything
would help since I can't, for the life of me, figure out what's wrong.

Here's the run-down.
We are running Zope 2.2.0 on Solaris, and we're running it through Apache +
SSL. We're using a PostgreSQL DB with the ZPoPyDA. We are also using
FSSession 0.4.0 for session management.
Previously, we were using Zope 2.1.6, accessing ZServer directly, and using
FSSession 0.3.1.

Here's the problem.
Previously, when we were accessing ZServer directly, Zope would
spontaneously quit. No reason, it would just die. Restarting it would bring
it back up, but minutes, sometimes hours, sometimes days later, it would
spontaneously die again. I asked the list, but no one had had such problems
(except Dieter, but that was an Oracle problem).
So now that we're running it through Apache, we're still, apparently, having
the same problem. What will happen is that every once in a while (more
frequently with more traffic), Zope will hang indefinitely. The only way to
get over it is to restart Zope. So apparently, the ZServer (which I guess
takes requests from the pcgi process), is still going down as before.

The question is, why is this happeneing? Or, more to the point, how can I
figure out why it is happeneing? I looked through the Zope logs and the
Apache logs and found nothing useful. I've been thinking that it might
correspond to a heavy database access. Perhaps there's a problem with the
ZPoPyDA. Or maybe it's FSSession (which, incidently, doesn't seem to be
expiring cookies correctly). Or maybe it's a compatability issue with
Solaris. I really don't kow, and I don't know how to go about finding out.

So any help anybody can give me would be fantastic. If anybody's had any
kind of similar problems, or if anybody has any suggestions, it would be
much appreciated.
I've racked my brains trying to figure it out, and I just can't.

Thanks.

Dave Leichtman
University of Oklahoma

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




Re: [Zope] dtml-let .. method /dtml-let

2000-08-23 Thread Bill Anderson

Jean Jordaan wrote:
 
 Hi all
 
 The answer to my previous question makes this one occur to
 me: if dtml-var id in a method refers to the containing
 document's id, does 'myMethod' get to see 'myVariable'?::
 
   dtml-let myVariable='Beep'
 dtml-var myMethod
   /dtml-let
 
 Testing .. yes, it does! Cool. So why does this::
 
   dtml-in "PARENTS[0].objectItems(['ccDocClass'])" size=10
   start=qs sort=dtml-var sort_key
 
 give::
 
   Invalid attribute name, "sort_key", for tag dtml-in
   "PARENTS[0].objectItems (['ccDocClass'])" size=10 start=qs
   sort=dtml-var sort_key, on line 18 of docsByTitle
 
 How do I get 'sort_key' in there?

First, you can't have dtml in dtml. Period.

Next, when you go to do a dtml-in (AIUI), the objects in the dtml-in are pushed to the 
front (top?) of the namespace.
sort_key would need to be a property/attribute of the ccDocClass for this to work, and 
you would just use sort=sort_key.

If sort_key is not a property of the ccDocClass objects, you have to do it some other 
way. 


UNTESTED HYPOTHESIS:
IF sort_key is in the request space, you _MIGHT_ be able to do
sort=REQUEST['sort_key']. But I am not sure; it's just a guess.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] compiling on windows

2000-08-23 Thread Wolfgang Strobl

On 23 Aug 2000, 15:23  Toby Dickenson wrote:

 On Wed, 23 Aug 2000 15:47:36 +0200, "Wolfgang Strobl" [EMAIL PROTECTED]
 wrote:
 
 Well, actually I have. But there aren't any workspace and project
 files (*.dsw and *.dsp).
 
 Hmmm, no. If you can wait, Ill send you the ones I use early next
 week.

Sure, thanks!

 
 most probably a somewhat modifie Python src dist
 
 Zope builds happily on a stock python 1.5.2 and the cvs versions of
 2.0 too.

Huh? I was under the impression that building python C extensions 
needs some stuff from the source dist. But I might be wrong here.




--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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] compiling on windows

2000-08-23 Thread R. David Murray

On Wed, 23 Aug 2000, Wolfgang Strobl wrote:
  Zope builds happily on a stock python 1.5.2 and the cvs versions of
  2.0 too.

 Huh? I was under the impression that building python C extensions 
 needs some stuff from the source dist. But I might be wrong here.

From my unix viewpoint, I assumed that "stock 1.5.2" *was* the
source dist grin.  Seriously, though, I believe Python 1.5.2 builds
on Windows, so you shouldn't have a problem.  And yes, building the
Zope C extensions requires at least a "devopers" installation of
Python, which usually means the source dist.  (I *think* that the
stuff that is needed is actually a fairly limited number of files,
at least if you are using loadable modules, so it might in fact
be true that the stock Python Windows install includes the necessary
files.)

--RDM


___
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] Using crontab instead of rc.d

2000-08-23 Thread George Osvald

Hello everyone!

My ISP where I have my web page, is running freeBSD 4.0. I do not know a lot
about it. I know how to use crontab to start ZOPE at certain time how ever
how do I use crontab to check on the script that is already running?
Starting ZOPE again when it's running produces an error message and I do not
know if that was a healthy solution.

to start it I would be using something like:

5   *   *   *   *   root./start

This would start the script every five minutes. Now how do I check if the
script is running after it's been started and if it wasn't to restart it
again. Also I was thinking to run ZOPE in DEBUG mode. That way it stays
attached to the terminal (crontab I guess).
I know about z2.pid. Nevertheless I find ZOPE down quite often every time
they do something at the ISP. I asked them what to do and they told me to
use crontab to check the script and restart it. For some reason they don't
want me to use rc.d
If I could guarantee to remove the z2.pid every time ZOPE goes down, I could
apparently include something like this:

if [ -x /home/virtuals/account/zope/z2.pid ]
then
// exit(0)
fi

5   *   *   *   *   root./start

to check if the file is present and if not to run the script. That can't be
done when ZOPE exits abnormally though.

Is this setup at all possible?

Regards,

George Osvald




___
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] Using crontab instead of rc.d

2000-08-23 Thread Dominic Mitchell

On Thu, Aug 24, 2000 at 04:05:11AM +1000, George Osvald wrote:
 Hello everyone!
 
 My ISP where I have my web page, is running freeBSD 4.0. I do not know a lot
 about it. I know how to use crontab to start ZOPE at certain time how ever
 how do I use crontab to check on the script that is already running?
 Starting ZOPE again when it's running produces an error message and I do not
 know if that was a healthy solution.
 
 to start it I would be using something like:
 
 5 *   *   *   *   root./start
 
 This would start the script every five minutes. Now how do I check if the
 script is running after it's been started and if it wasn't to restart it
 again. Also I was thinking to run ZOPE in DEBUG mode. That way it stays
 attached to the terminal (crontab I guess).
 I know about z2.pid. Nevertheless I find ZOPE down quite often every time
 they do something at the ISP. I asked them what to do and they told me to
 use crontab to check the script and restart it. For some reason they don't
 want me to use rc.d
 If I could guarantee to remove the z2.pid every time ZOPE goes down, I could
 apparently include something like this:
 
 if [ -x /home/virtuals/account/zope/z2.pid ]
 then
   // exit(0)
 fi
 
 5 *   *   *   *   root./start
 
 to check if the file is present and if not to run the script. That can't be
 done when ZOPE exits abnormally though.
 
 Is this setup at all possible?

Not quite.

You don't want to run the start program from cron directly.  What would
be better is to write a small script and call that.  My hint of the day
is that you can use "kill -0 $pid" to test to see whether a pid is
alive.  eg:

if ! kill -0 `cat /home/virtuals/account/zope/z2.pid` ; then
cd /home/virtuals/account/zope ; ./start
fi

However, zope already implements a keepalive facility.  If you look at
the existing Z2.pid file, you'll notice that there are two pids (at
least, there are on my 2.1.6 setup).  And if the child dies, it gets
restarted.  For details, see ~zope/lib/python/zdaemon.py.

All of which means that you probably don't want to bother setting this
up.

-Dom

___
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] Using crontab instead of rc.d

2000-08-23 Thread Adam Karpierz

Is this setup at all possible?

Regards,

George Osvald


Hi George

It's my working solution (Linux RH):

crontab command
-
0,30 * * * * /home/adares/.start

setup file: /home/adares/.start
--
#! /bin/sh

ZOPEDIR="/home/adares/Zope"
PORTMASK="8000"
INFOMAIL="[EMAIL PROTECTED]"

STARTFILE="$ZOPEDIR/start"
STOPFILE="$ZOPEDIR/stop"
PIDFILE="$ZOPEDIR/var/Z2.pid"
PID1ACTIVE=0
PID2ACTIVE=0
if [ -x $STARTFILE ]; then
  if [ -r $PIDFILE ]; then
PID1=`cut -d" " -f1 $PIDFILE`
PID2=`cut -d" " -f2 $PIDFILE`
if
ps -p $PID1 /dev/null 21
then
  PID1ACTIVE=1
fi
if
ps -p $PID2 /dev/null 21
then
  PID2ACTIVE=1
fi
  fi
  if [ $PID1ACTIVE -eq 0 -o $PID2ACTIVE -eq 0 ]; then
$STOPFILE /dev/null 21
sleep 10
$STARTFILE -P $PORTMASK -Z 'var/Z2.pid'
date | mail -s"Zope restarted" $INFOMAIL /dev/null 21
  fi
fi


Regards
--
Adam Karpierz
[EMAIL PROTECTED]



begin 666 .start
M(R$@+V)I;B]S: H*6D]0141)4CTB+VAO;64O861AF5S+UIO4B"E!/4E1-
M05-+/2(X,# P(@I)3D9/34%)3#TB861AF5S0%LAA+G!L(@H*4U1!4E1
M24Q%/2(D6D]0141)4B]S=%R="(*4U1/4$9)3$4](B1:3U!%1$E2+W-T;W B
M"E!)1$9)3$4](B1:3U!%1$E2+W9AB]:,BYP:60B"E!)1#%!0U1)5D4], I0
M240R04-4259%/3 *:68@6R M" D4U1!4E124Q%(%T[('1H96X*("!I9B!;
M("UR("1024124Q%(%T[('1H96X*(" @(%!)1#$]8-U=" M9"(@(B M9C$@
M)%!)1$9)3$5@"B @("!0240R/6!C=70@+60B("(@+68R("1024124Q%8 H@
M(" @:68*(" @('!S("UP("10240Q(#XO95V+VYU;P@,CXF,2 *(" @('1H
M96X*(" @(" @4$E$,4%#5$E613TQ"B @("!F:0H@(" @:68*(" @('!S("UP
M("10240R(#XO95V+VYU;P@,CXF,0H@(" @=AE;@H@(" @("!0240R04-4
M259%/3$*(" @(9I"B @9FD*("!I9B!;("10240Q04-4259%("UE2 P("UO
M("10240R04-4259%("UE2 P(%T[('1H96X*(" @("135$]01DE,12 ^+V1E
M=B]N=6QL(#(^)C$*(" @('-L965P(#$P"B @(" D4U1!4E124Q%("U0("10
M3U)434%32R M6B G=F%R+UHR+G!I9"*(" @(1A=4@?"!M86EL("US(EIO
M4@F5S=%R=5D(B D24Y3TU!24P@/B]D978O;G5L;" R/B8Q"B @9FD*
#9FD*
`
end


___
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] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Richard Folwell

Check out this ODBC-ODBC bridge:

http://linuxpr.com/releases/430.html

I have not tried it, but it does seem to do what you want.

"The ODBC-ODBC Bridge is a package of libraries which provide applications on Linux 
with access to
ODBC data sources on remote machines. Examples of using the ODBC-ODBC Bridge are:


Apache/PHP + the ODBC-ODBC Bridge (running on Linux) to read/write data held in 
Microsoft SQLServer
on NT.
Perl + DBI + DBD:ODBC + the ODBC-ODBC Bridge (running on Linux) to read/write data 
held in a
Microsoft Access database on NT.
As above but with Python's mxODBC, RExx/SQL or any C application.
Access from StarOffice or Applixware on Linux to remote ODBC databases.
Access to any remote ODBC compliant driver."

If you find problems with this one, I suspect that there are other offerings (web 
search, "+ODBC
+bridge").

Richard

P.S. Please let us know how you get on.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Darin
 Lee
 Sent: 23 August 2000 14:13
 To: [EMAIL PROTECTED]
 Subject: [Zope] Microsoft SQL Server Access under Linux?


 Zopistas,

 Is it possible to access an ODBC data source through Zope running under Linux? I have
 perused the literature, and it appears the Zope DA's for ODBC only run under the 
Win32
 environment.

 I would very much like to setup ZAP (for many reasons), but our "organizational 
standard"
 is MS SQL Server 6.5.

 Thanks,
 -Darin Lee




 Darin M. Lee
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]

 Darin M. Lee
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]


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




___
Zope 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] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Spicklemire, Jerry

Darin asked:

 Is it possible to access an ODBC data source through Zope running under
Linux?

I'm getting ready to test such a solution this week. First, we'll try :

ODBC Socket Server  http://odbc.linuxave.net/

and the accompanying Python Client. This will require some coding, and
wrapping the Python Client as an External Method. ODBC Socket Server isn't
the most generic approach I've seen, but it is about as simple as such stuff
can get.

If that one doesn't pan out, it's on to :

SQLRelay
http://www.firstworks.com/site/pages/html/frames.html

which is more generic, and even has a Zope Database Adapter.

My fallback plan, assuming insurmountable snags with the first two attempts
is:

FreeTDS http://www.freetds.org/

which is SQL Server specific, and so the least generic of all.

Then, if all else fails, we'll have to look at the OpenLink (for $) stuff.

OpenLinkhttp://www.openlinksw.com/

I'll let you know how it goes.

Later,
Jerry 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 )




Re: [Zope] Generic Workflow Products?

2000-08-23 Thread albert boulanger



  

  Sounds like a job for Zope, doesn't it.  Basically I've
  implemented a couple of systems like this, either
  classic database-driven or z-class driven.  But I'm tired
  of re-inventing the wheel.  It would be nicer if systems
  like this could be implemented at the "workflow logic" 
  level rather than the Zclass level.  IE a set of ZClasses
  or Product classes that implemented workflow systems.

  Is there such a thing? Has anyone worked on such a thing?  
  Any ideas how to implement such a thing?

  I've got a couple of modifications to an existing system
  coming up, which sounds like just the excuse I need
  for a total rewrite :)

  -- cary

   There are several workflow activites within Zope that I know of:

   PTK has and "implicit" workflow support for moving documents in a
   review process. Unfortunately workflow hangs off of the documents from
   what I saw of its design patterns. Not a good design if a workflow
   step involves multiple documents and the execution of applications on
   data.

   Several Zope sites have some kind of workflow for what they do. There
   is a mesh healing (CAD/CAM) Zope based application service provider
   (ASP) that comes to mind.

   There is an standards based (WFMC -- workflow management coalition,
   www.wfmc.org) Zope product that really has seen no progress since early
   this year - see openflow.sourceforge.net

   You might consider marrying a workflow engine like Staffware's to
   Zope. This marriage may be easier if they support SWAP (simple
   workflow access protocol see www.ics.uci.edu/~ietfswap). Staffware has
   indicated that they will (are) supporting SWAP.

   We are a company, vPatch, that is building web-based workflow that can
   run apps for the oil and gas industry. Our current system uses tclets
   to display workflow graphically, but we are going to Java.  It would
   be nice to work on a good set of (standards based) design patterns for
   workflow and implement them in Zope. In my mind these patterns would
   consider pluggable workflow engines like Staffware's using SWAP.


   Yours in workflow,
   Albert Boulanger
   [EMAIL PROTECTED]


 

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




Re: [Zope] Using crontab instead of rc.d

2000-08-23 Thread KIMMELL

Hello,

Here's something I put together. I am pretty much clueless when it comes
to bash shell programming, so this may be a really bad way to do things. I
would think you could run this script from your crontab. I tried this on
Redhat 6.2 , so YMMV.

-garrin

-- begin script --

#!/bin/bash
ZOPEHOME=/var/Zope-2.2.0-linux2-x86
DEAD="
"

for pid in `cat $ZOPEHOME/var/Z2.pid`; do
status=`ps --no-headers -p $pid`
if test $status == $DEAD; then
echo "Restarting Zope"
nohup $ZOPEHOME/start
break;
fi
done   

-- end script --

 On Thu, 24 Aug 2000, George Osvald wrote:

 Hello everyone!
 
 My ISP where I have my web page, is running freeBSD 4.0. I do not know a lot
 about it. I know how to use crontab to start ZOPE at certain time how ever
 how do I use crontab to check on the script that is already running?
 Starting ZOPE again when it's running produces an error message and I do not
 know if that was a healthy solution.
 
 to start it I would be using something like:
 
 5 *   *   *   *   root./start
 
 This would start the script every five minutes. Now how do I check if the
 script is running after it's been started and if it wasn't to restart it
 again. Also I was thinking to run ZOPE in DEBUG mode. That way it stays
 attached to the terminal (crontab I guess).
 I know about z2.pid. Nevertheless I find ZOPE down quite often every time
 they do something at the ISP. I asked them what to do and they told me to
 use crontab to check the script and restart it. For some reason they don't
 want me to use rc.d
 If I could guarantee to remove the z2.pid every time ZOPE goes down, I could
 apparently include something like this:
 
 if [ -x /home/virtuals/account/zope/z2.pid ]
 then
   // exit(0)
 fi
 
 5 *   *   *   *   root./start
 
 to check if the file is present and if not to run the script. That can't be
 done when ZOPE exits abnormally though.
 
 Is this setup at all possible?
 
 Regards,
 
 George Osvald
 
 
 
 
 ___
 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] Stupid SiteAccess Question

2000-08-23 Thread Terry Babbey

OK. I just downloaded SiteAccess 2.0.0b3 and untarred it in my Zope
directory. I shutdown and restarted Zope but when I go to Control
Panel/Manage Products I do not see SiteAccess listed. AM I missing
something here ( quite probable )?
Terry

--
__
Terry Babbey
Technical Support Specialist
Lambton College, Sarnia, Ontario, Canada
__



___
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] Stupid SiteAccess Question

2000-08-23 Thread Terry Babbey

I found my problem! I thought I was following the directions when I
un-tarred SiteAccess in the root of my Zope installation, but when I
moved the SiteAccess subdirectory down with the other python products -
well whadya know - it works!
Terry

"J. Atwood" wrote:

 You should have two things in your "Available Objects" menu.

 Set Access Rule
 Site Root

 Those are the ones you need to do it.

 http://www.zope.org/Members/4am/SiteAccess2/info

 Good luck,
 J

  From: Terry Babbey [EMAIL PROTECTED]
  Date: Wed, 23 Aug 2000 15:57:45 -0400
  To: [EMAIL PROTECTED]
  Subject: [Zope] Stupid SiteAccess Question
 
  OK. I just downloaded SiteAccess 2.0.0b3 and untarred it in my Zope
  directory. I shutdown and restarted Zope but when I go to Control
  Panel/Manage Products I do not see SiteAccess listed. AM I missing
  something here ( quite probable )?
  Terry
 
  --
  __
  Terry Babbey
  Technical Support Specialist
  Lambton College, Sarnia, Ontario, Canada
  __
 
 
 
  ___
  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 )
 
 

--
__
Terry Babbey
Technical Support Specialist
Lambton College, Sarnia, Ontario, Canada
__



___
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] Stupid SiteAccess Question

2000-08-23 Thread J. Atwood

You should have two things in your "Available Objects" menu.

Set Access Rule
Site Root

Those are the ones you need to do it.

http://www.zope.org/Members/4am/SiteAccess2/info

Good luck,
J

 From: Terry Babbey [EMAIL PROTECTED]
 Date: Wed, 23 Aug 2000 15:57:45 -0400
 To: [EMAIL PROTECTED]
 Subject: [Zope] Stupid SiteAccess Question
 
 OK. I just downloaded SiteAccess 2.0.0b3 and untarred it in my Zope
 directory. I shutdown and restarted Zope but when I go to Control
 Panel/Manage Products I do not see SiteAccess listed. AM I missing
 something here ( quite probable )?
 Terry
 
 --
 __
 Terry Babbey
 Technical Support Specialist
 Lambton College, Sarnia, Ontario, Canada
 __
 
 
 
 ___
 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] Re: Stupid SiteAccess Question

2000-08-23 Thread Steve Alexander


Terry Babbey wrote:
 OK. I just downloaded SiteAccess 2.0.0b3 and untarred it in my Zope
 directory. I shutdown and restarted Zope but when I go to Control
 Panel/Manage Products I do not see SiteAccess listed. AM I missing
 something here ( quite probable )?

The latest SiteAccess is packaged a little differently from most other
products.

Most products are created with the idea that you will untar them in your
Zope directory, adn they will put themselves in
lib/python/Products/ProductName.

SiteAccess just puts itself in the directory SiteAccess.

Therefore, you need to untar the siteaccess archive in your
lib/python/Products directory.

Seeing as you've already done this, you can simply move the SiteAccess
folder from one level below your Zope installation folder, and put it in
your Products folder.

The reason SiteAccess is this way is that it provudes better
compatibility with using INSTANCE_HOME to share a single bunch of code
between many Zope instances.

From the CHANGES.txt file:

* The tarball no longer includes 'lib/python/Products' in file
paths.  It must be unpacked in the Products directory, for
better compatibility with INSTANCE_HOME installations.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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] ZMenu 0.0.2 product

2000-08-23 Thread Hugo Ramos

Yellow ppl,

ZMenu is a complete navigational system that uses a tree like display. It
allows you to dinamicly add a navigational link menus system to your site.

This ZClass based product is still in a development stage and I'dd like to
have some feedback about it... so email me about any problems or sugestions.

You can download it here (there is also a pic):
http://www.zope.org/Members/hramos/products/ZMenu


=
Hugo Ramos - [EMAIL PROTECTED]
ZopersORG - http://www.zopers.org
=
Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!


___
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] Using crontab instead of rc.d

2000-08-23 Thread Robert Miller

On Wed, 23 Aug 2000, George Osvald wrote:

 My ISP where I have my web page, is running freeBSD 4.0. I do not know a lot
 about it. I know how to use crontab to start ZOPE at certain time how ever
 how do I use crontab to check on the script that is already running?
 Starting ZOPE again when it's running produces an error message and I do not
 know if that was a healthy solution.
 
 to start it I would be using something like:
 
 5 *   *   *   *   root./start
 
SNIP further description
 
 Is this setup at all possible?

The first thing I would do would be to handle all of this in a separate script,
and call that script from the crontab, rather than trying to integrate the
detection of the Zope process into the crontab file.  This way you could use
your favorite scripting language (I'd use python ;-]) to read the z2.pid file,
check for the existence of that process, check to see that the process is
indeed the Zope (python) process, and to relaunch Zope if need be.  There's
still the (probably) very minimal chance that your Zope could die, and then
another Zope process could be launched that ends up with the same PID, thus
fooling your detection script (depending on how it was coded), but I'm sure
even this is preventable, assuming the probability of my scenario occurring is
high enough to even warrant this effort.

So your crontab would end up like:

5   *   *   *   *   root./startzopeifdead.py

The 'startzopeifdead.py' (or whatever you end up naming it) will be the one to
execute the './start' command, if need be.

rob

___
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 can I determine the list of user names?

2000-08-23 Thread jpenny

 I would like to construct a pull down of the users defined in
an acl_users of a particular location.  

Say in particular, that /protected/acl_users exists.  How do
I find (in dtml or in python), the list of names defined in that
particular acl_users.  

To slightly generalize, how would one tree-walk to find the list
of all acl_users above a particular object?

Thanks

Jim

___
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] processing dtml in external method

2000-08-23 Thread Dieter Maurer

Scott Shepherd writes:
  I have an external method that returns a string containing dtml, but 
  I want it to evaluate the dtml and return the result. How do I do 
  that?
"evaluating dtml" means calling it.

The "__call__" of DTML methods, or, more generally, DocumentTemplates,
has two positional parameters, "client" and "REQUEST",
and an arbitrary number of keyword parameters.

"client" is "None", a single object or a tuple of objects,
"REQUEST" is "None" or a mapping, the keyword parameters
are anything.

The parameters determine, what bindings (i.e. name - value mappings)
are available in the DocumentTemplate's namespace.
If there are conflicts, the higher priority source wins.
The priority order is as follows (highest priority first):

  * keyword parameters
  * attributes of client
(I am not sure about the relative priority in the case
 of more than one clients. I believe to remember
 that later clients have higher priority)
  * the mapping.


Dieter


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




Re: [Zope] How to test if an object exist

2000-08-23 Thread Dieter Maurer

Francois-Regis CHALAOUX writes:
  Errot Type: NameError
  Error Value: folder1
  
  How to manage this problem ?
  
  FR.
  
  =
  CODE
  =
  def testFolder(self):
  self=self.this()
  sub1=self.folder1
  exec "object2create = 'folder11'"
  try:
  if sub1.object2create:
  return 'Object exists'
  except AttributeError:
  sub1.manage_addFolder(object2create)
  return 'Object created'
Are you sure, you get the "NameError" inside your external method?

I hope, you are not, because the method cannot raise a (NameError,folder1).

Anyway, if your problem is in Python code, the traceback contains
precise line number information for the problem.


In order to test, whether an object O can access another object o,
you can use: "hasattr(O,'o')".

In your example:

if hasattr(self,'folder1'): return 'Object exists'

This will not test, that 'folder1' is contained in "self"
but that a 'folder1' is accessible (acquired) in "self".

In order to test for direct containment, you would use
"self.aq_base" instead of "self".



Dieter

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




Re: [Zope] Including a method returning batches inside a page.

2000-08-23 Thread Dieter Maurer

Jean Jordaan writes:
  In my 'index_html', I have::
  
dtml-var docsByTitle
  
  This is supposed to return batches of documents, similarly to
  http://www.zope.org/Products/ [1]. It works halfway, but the links
  to previous and next batches of course refer to 'docsByTitle'
  and not to 'index_html'::
  
a href="dtml-var document_iddtml-var sequence-queryqs=dtml-var
  next-sequence-start-number"
"document_id" is the id of the executing DTML objects.

For a DTML method(!), "id" is the id of the object of which
the method is used as a method.
In your case, this is the folder.

In some cases, you would use "this().id".
This gives you the id of the "top level" DTML object.
In your case, this would be "index_html".


Dieter

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




Re: [Zope] newbiz : zope connection

2000-08-23 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
  I want to know how many people are connected on my zope server, and who 
  are they, has anybody an idea to see this sort of information ?
HTTP is a connection less protocol (to be precise, HTTP 1.0).
Thus, a priori, there is no notion of connection:

  A user is only connected to the server for the duration
  of a single request. The connection is closed as
  soon as the request is completed.


Zope 2.2 has a facility in its Control Panel where you
can see, how much requests are currently in work.
This gives you the 'currently' connected users.

To get more information, you would analyse ZServer's
log file: "var/Z2.log". It contains an entry for
each HTTP request.

There are tools to analyse such a log file.
Search the mailing list's archive for suggestions for such
tools.


Dieter


PS: please do not post "multipart/alternative" (or other MIME messages)
to the Zope lists.

___
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] Corruption caused by 'Pack'?

2000-08-23 Thread Dieter Maurer

Marcin Kasperski writes:
   pack corrupts Data.fs 
  
  Has anyone notified similar problems? What could be going on?
An officially announced and fully described bug...

You know by now where you find the searchable archive?


Dieter

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




Re: [Zope] Barcodes, magnetic cards, etc.

2000-08-23 Thread Curtis Maloney

On Wed, 23 Aug 2000, Erik Enge wrote:
 [Curtis Maloney]

 | On Wed, 23 Aug 2000, Erik Enge wrote:
 |  What is the mainstream format for the codes when the are scanned in?
 |
 | I don't understand what you mean.

 Are the barcodes usually a collection of integers, characters, special
 characters or what?

Ah.. now we come to the interesting parts. (o8

Different barcode character sets contain different symbols.  Mostly, however, 
they will contain letters and numbers.  Take a look at an item with a 
barcode, and you will see a string underneath it.  This is the human readable 
form of the barcode.

 And, by the way, do you know if there exist a magnetic card scanner
 that plugs in to the PS/2?  And if yes, which information would get
 from such a card?  Just a number, or are there other possibilities?

What is on the card is, strangely enough, what is on the card.  Magstripe 
readers commonly interface to ps/2 keyboard ports via a 'chok' or 'wedge', 
which just plugs inline with your regular keyboard.


 Thanks.


Not a problem.

Curtis.

___
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] Creating an object from within another

2000-08-23 Thread Chris McDonough

I haven't gone back to look at the history of this thread, but it seems
you want to call something like;

self.manage_addProduct['SimpleSite'].manage_addBasicDocument(id='index_h
tml', title='')

(manage_addProduct is a mapping of Product name to Product object.  as
long as you've registered the constructors for SimpleSite in the
__init__ of the Product, you should be able to get to them like this).

 -Original Message-
 From: Daniel Rusch [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 21, 2000 2:15 PM
 To: Chris McDonough
 Cc: Kapil Thangavelu; Dieter Maurer; [EMAIL PROTECTED]
 Subject: Re: [Zope] Creating an object from within another
 
 
 Thanks for the help gentlemen, but I still get the same error mesage:
 
Zope Error
 
   Zope has encountered an error while publishing this resource.
 
   AttributeError
 
   Sorry, a Zope error occurred.
 
   Traceback (innermost last):
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, 
 line 214, in
 publish_module
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, 
 line 179, in
 publish
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/Zope/__init__.py, line 202, in
 zpublisher_exception_hook
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, 
 line 165, in
 publish
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/mapply.py, 
 line 160, in
 mapply
   (Object: manage_addSimpleSite)
 File 
 /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, 
 line 102, in
 call_object
   (Object: manage_addSimpleSite)
 File 
 /home/zope/lib/python/Products/SimpleSite/SimpleSite.py, line 72, in
 manage_addSimpleSite
   AttributeError: manage_addBasicDocument
 
 Any thoughts,
 
 DR
 
 
 
 Chris McDonough wrote:
 
  I think he meant ob.__of__(self) which wraps ob into the context of
  self.  Useful for returning unwrapped Python objects while you're in
  Python.
 
  On Fri, 18 Aug 2000, Kapil Thangavelu wrote:
 
   Dieter Maurer wrote:
   
Daniel Rusch writes:
  So far so good,
 
  Next hurdle, at least the problems have been cut 
 down to hurdles from walls.
 
  I have a folderish product say myFolder, in the 
 manage_addMyFolder function I
  want to create an object of my product B. so I do this:
 
  def manage_addmyFolder(self, id, title='',
   REQUEST=None):
  """Add a new myFolder object with id *id*.
  """
  ob=myFolder()
  ob.id=id
  ob.title=title
  self._setObject(id, ob)
  try: user=REQUEST['AUTHENTICATED_USER']
  except: user=None
  ob.manage_addB(id='index_html', title='') -- if 
 I change this to
Try:   (ob __of__ self).manage_addB()
  
   whats is  ob__of__self ???
  
   acquisition at its best?
  
   attribute access to get a reference to the ob attr of self?
  
   kapil
  
   ___
   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 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] Simple Directory of URLs problem (Waaa)

2000-08-23 Thread Peter Be

Roug

Installing your Simple Directory of URLs gives me this message when I start
up Zope on window98.

"that is not valid. This should never happen. (Waaa)."

There is something wrong with the permissions I guess but I can't see the
error message it generates because either I'm stupid or MS DOS PROMPT is to
short on lines.
If it was Linux I could at least have scrolled upwards to see the whole
error message.
I can see that the error must occur in PermissionMapping.py


I run Zope 2.2.1b1 on Windows98.
The tgz file I downloaded contained three files. __init__.py, version.txt
and product.dat. Is that correct?
The problem is, that I can't see or Add the Simple URL object from my Add
dropdown list. Why is that?

I have so far never had any problems with this setup. (I think)
It is a development server, so I can knock it off and start again if I have
to.

I have followed the Installation instructions, and I have successfully
installed your product previously on Zope 2.1.6

Cheers, Peter



___
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 can I determine the list of user names?

2000-08-23 Thread Curtis Maloney

On Thu, 24 Aug 2000, [EMAIL PROTECTED] wrote:
 I would like to construct a pull down of the users defined in
 an acl_users of a particular location.

I am doing this soon, also, so I've put in a little thought on the problem. 
(But only a little :)

 Say in particular, that /protected/acl_users exists.  How do
 I find (in dtml or in python), the list of names defined in that
 particular acl_users.


My guess (untested) is :

select name="users"
  dtml-in getUserNames
option value="dtml-var sequence-item"dtml-var sequence-item
  /dtml-in
/select
  
 To slightly generalize, how would one tree-walk to find the list
 of all acl_users above a particular object?

Well, as I said, this is untested, but I'm assuming getUserNames does this 
for you.  The ZQR is somewhat sparse on the details.


 Thanks

Please, let me know how this goes.

 Jim


Have a better one,
Curtis Maloney

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




[Zope] dtml syntax for showing folder objects?

2000-08-23 Thread sean

Hi,
I wonder how one would show the dtml documents in a folder with a 
dtml statement.  I see it working with the tree command and I see 
it working in Yihaw, but there must be a simple way to show just 
files as links by some sort of call with the subfolder name.  Any 
ideas?

___
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: [Zope-dev] Fighting with ZServer

2000-08-23 Thread T.J. Mannos

Dieter,

Yes, I have, and I spent hours tearing apart my site thinking I'd seriously
screwed-up when suddenly all my images refused to load.  But that was just
on my Solaris 2.6 server.  PCs and even Macs render my pages beautifully.
It's just Netscape Communicator for Solaris that causes a problem.  I don't
have a clue.

But, I can tell you why your logs wouldn't be showing up.  Netscape caches
images so that it doesn't have to keep reloading them from the server.  If
it's reading a cached image, you won't see an entry in the server log.

Hope this helps,
T.J.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Dieter Maurer
Sent: Monday, August 21, 2000 2:36 PM
To: [EMAIL PROTECTED]
Subject: [Zope-dev] Fighting with ZServer


Since this afternoon, I am fighting with ZServer.
Currently, it seems Zserver is winning 
I do not understand, what I see...

At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 4.51

  Sometimes, images are not shown by Netscape (broken image).
  No "simple" reload is able to change this, however a "forced" reload
  lets Netscape show the image correctly.
  From then on, the image is always shown correctly: by "simple" reload,
  "forced" reload or directly (served from cache).

  The strange thing, inside "Image.index_html" the failing
  "simple" reload and the succeeding "forced" reload look
  completely identical.


At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5

  All images are always shown correctly.
  However, there is no log entry in "var/Z2.log" for
  about 50 % of the requests that are answered by
  a 304 response. It is non-deterministic whether
  a log entry is written or not.


Did you ever see something like this?


Dieter

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


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




Re: [Zope] dtml syntax for showing folder objects?

2000-08-23 Thread Kapil Thangavelu

Andrew Kenneth Milton wrote:
 
 +---[ [EMAIL PROTECTED] ]--
 | Hi,
 | I wonder how one would show the dtml documents in a folder with a
 | dtml statement.  I see it working with the tree command and I see
 | it working in Yihaw, but there must be a simple way to show just
 | files as links by some sort of call with the subfolder name.  Any
 | ideas?
 
 Here's possibly the ugliest idea..
 
 dtml-with SubFolder
 dtml-in "objectIds()"
 a href="dtml-var "_.getitem(_['sequence-item'],0).absolute_url()""dtml-var 
sequence-item/abr
 /dtml-in
 /dtml-with
 
 We use objectIds() rather than objectValues in case you want to pass a mask
 to objectIds(). This way we only instantiate the objects we're interested
 it.
 
 We could have used nested calls to getitem, but, that wasn't as funky looking.


FYI you can pass a mask to objectIds as well. 

dtml-with SubFolder
dtml-in "objectItems(['DTML Document'])"
a href="dtml-var.absolute_url"dtml-var sequence-key/a
/dtml-in
/dtml-with

___
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] ZClass Date Fields

2000-08-23 Thread Craig

I'm sure you've heard this question before, so bare with me. I went through
the ZClass tutorial and got everything working right except Date properties.
Lets assume, for example, that my ZCLass is called CDClass. When I create a
new CDClass instance (using the addForm), it always uses the default date
for Date properties instead of the ones I've entered in the form. A
co-worker of mine has had the same problem but we have not yet discovered
why. Thoughts? Solutions?

Later,
-- 
\ Craig "Cowboy" McDaniel 
/_\ Software Engineer
/_/_\ Internet Tool  Die
/_/_/_\ [EMAIL PROTECTED]
/_/_/_/_\ (502) 584-8665 ext 108

___
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] ZClass Date Fields

2000-08-23 Thread Loren Stafford

I think what you need is here:

http://www.zope.org/Members/lstaffor/zProperties

-- Loren

- Original Message -
From: "Craig" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: August 23, 2000 07:32 PM
Subject: [Zope] ZClass Date Fields


 I'm sure you've heard this question before, so bare with me. I went
through
 the ZClass tutorial and got everything working right except Date
properties.
 Lets assume, for example, that my ZCLass is called CDClass. When I create
a
 new CDClass instance (using the addForm), it always uses the default date
 for Date properties instead of the ones I've entered in the form. A
 co-worker of mine has had the same problem but we have not yet discovered
 why. Thoughts? Solutions?

 Later,
 --
 \ Craig "Cowboy" McDaniel
 /_\ Software Engineer
 /_/_\ Internet Tool  Die
 /_/_/_\ [EMAIL PROTECTED]
 /_/_/_/_\ (502) 584-8665 ext 108

 ___
 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 can I determine the list of user names?

2000-08-23 Thread Bill Anderson

[EMAIL PROTECTED] wrote:
 
  I would like to construct a pull down of the users defined in
 an acl_users of a particular location.

When do you need it (can it wait a bit?), and are you needing to authenticate against 
an external database?

The Membership (ALPHA!) product has the means for doing so, but it looks a weak or two 
from being beta. Mind you, I do
have three production sites using it, but I like living on the edge ... the view is 
better. :)



--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] Product creation question

2000-08-23 Thread Daniel Rusch


I've created a product called BasicDocument. I've installed it and it works
great.
I've also created a folderish product. Installed. When a user selects
that product from the
available objects list, thus creating an instance of that product,
they have an option to
create sub folders which contain objects like dtml documents,
dtml methods, and my BasicDocument product
(very similar to what happens when you instantiate a folder object,
you can have a dtml method created in the new folder).

I am able to have the manage_addSimpleSite function to create DTMLDocument,
DTMLMethod and Folder objects but I am unable to have the function create
BasicDocuments (which live in the Products directory) additionally, I am
unbale to it create any Products from the Products directory,
such as Local File System?

The code below works great, I get a dtml document, two folders
each with a dtml method in them

HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM
THE
PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION???
ob.manage_addBasicDocument(id='index_html', title='')
-- THISLINESGENERATESANERROR:
AttributeError: manage_addBasicDocument
ref the code below.
Please reply all if you are responding from the dev list
as I usually don't monitor the dev list.
Thanks,
Dan

def manage_addSimpleSite(self, id, title='',

createNewFolder=0,

createEditFolder=0,

REQUEST=None):
 """Add a new SimpleSite object with id *id*.

 If the 'createNewFolder' and 'createEditFolder'
parameters are set
to any true
 value, an 'New sub Folder' and an 'edit sub
Folder' objects are
created respectively
 in the new SimpleSite.
 """
 ob=SimpleSite()
 ob.id=id
 ob.title=title
 self._setObject(id, ob)
try: user=REQUEST['AUTHENTICATED_USER']
 except: user=None
 ob.manage_addBasicDocument(id='index_html',
title='') -- THISLINESGENERATESANERROR:
AttributeError: manage_addBasicDocument
 ob.manage_addDTMLDocument(id='index_html',
title='')
 if createNewFolder:
 if (user is not None)
and not (

user.has_permission('Add User SimpleSites', self)):

raise 'Unauthorized', (

'You are not authorized to add User SimpleSites.'

)
 ob.manage_addFolder(id='New'+id,
title='', createPublic=1)
 if createEditFolder:
 if (user is not None)
and not (

user.has_permission('Add Documents, Images, and Files',
self)):

raise 'Unauthorized', (

'You are not authorized to add DTML Documents.'

)
 ob.manage_addFolder(id='Edit'+id,
title='', createPublic=1)
 if REQUEST is not None:
 return self.manage_main(self,
REQUEST, update_menu=1