[Zope] Newbie Question

2006-09-24 Thread Perry Smith
Is it possible to have the same host running ZOPE 2 and ZOPE 3?  I would like to put both on a Mac OS X server.  I have Apache 2.2 running on it and PostgreSQL version 8.1.3 running my existing software.  I'd like to add zwiki which uses ZOPE 2.  And then add ZOPE 3 so that I can start developing a new application.  Can all three of these coexist on the same machine?  Are there any suggested do's and don'ts to follow in such an arrangement?Thank you, Perry SmithEase Software, Inc.[EMAIL PROTECTED]http://www.easesoftware.comSATA Products for IBMs RS/6000, pSeries, and AIX systems ___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Newbie Question

2006-09-24 Thread Andreas Jung



--On 24. September 2006 10:49:12 -0500 Perry Smith [EMAIL PROTECTED] 
wrote:



Is it possible to have the same host running ZOPE 2 and ZOPE 3?  I  would
like to put both on a Mac OS X server.  I have Apache 2.2  running on it
and PostgreSQL version 8.1.3 running my existing  software.  I'd like to
add zwiki which uses ZOPE 2.  And then add  ZOPE 3 so that I can start
developing a new application.  Can all  three of these coexist on the
same machine?  Are there any suggested  do's and don'ts to follow in such
an arrangement?



You can use configure --prefix=/path/to/dir to install (at least Zope 2)
into a custom location. This might also work for Zope 3. In addition
you must adjust the ports in etc/zope.conf (for Zope 2) in order to run
multiple Zope instances on different ports.

-aj



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


Re: [Zope] pointers in zope (newbie question)

2006-04-25 Thread Andreas Jung



--On 25. April 2006 19:17:11 +0200 thomas desvenain 
[EMAIL PROTECTED] wrote:



hello,

i need to have the same object at different places,
more properly, i need to refer an object at different places, in
different folders, of my zope application



Look in the mailinglist archive (of the last weeks) for the thread same 
object in different containers.


-aj

--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


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


[Zope] Newbie-question

2005-06-23 Thread Thomas Adams

hi all,

I have specific folder name art in Zope in which i installed a user 
folder, and a user

with manager role. now i want anaonymous user to access i.e view
the website ubeneath the folder art. Therefore i granted View 
Permission to the Anonymous Role
at the folder level art, but that doesn't work. Then i came to the 
conclusion to grant that

Permission at root level. But that doesn't work too. So my question is:
What i have to do if:

1. i want only a manager user acces to the ZMI beneath the folder art
2. grant anonymous user acces to view the generated pages beneath this 
folder


Thanks  in advance
Thomas Adams



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

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


Re: [Zope] Newbie-question

2005-06-23 Thread Paul Winkler
On Thu, Jun 23, 2005 at 08:55:05PM +0200, Thomas Adams wrote:
 hi all,
 
 I have specific folder name art in Zope in which i installed a user 
 folder, and a user
 with manager role. now i want anaonymous user to access i.e view
 the website ubeneath the folder art. Therefore i granted View 
 Permission to the Anonymous Role
 at the folder level art, but that doesn't work. Then i came to the 
 conclusion to grant that
 Permission at root level. But that doesn't work too. So my question is:
 What i have to do if:
 
 1. i want only a manager user acces to the ZMI beneath the folder art

It should be enough to give only to Manager the permission
View management screens on that folder.

 2. grant anonymous user acces to view the generated pages beneath this 
 folder

View and Access Contents Information usually do the trick.
If not, google for VerboseSecurity - a great add-on product
that will help debug security issues.

-- 

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


Re: [Zope] Newbie-question

2005-06-23 Thread Thomas Adams

Paul Winkler schrieb:


On Thu, Jun 23, 2005 at 08:55:05PM +0200, Thomas Adams wrote:
 


hi all,

I have specific folder name art in Zope in which i installed a user 
folder, and a user

with manager role. now i want anaonymous user to access i.e view
the website ubeneath the folder art. Therefore i granted View 
Permission to the Anonymous Role
at the folder level art, but that doesn't work. Then i came to the 
conclusion to grant that

Permission at root level. But that doesn't work too. So my question is:
What i have to do if:

1. i want only a manager user acces to the ZMI beneath the folder art
   



It should be enough to give only to Manager the permission
View management screens on that folder.

 

2. grant anonymous user acces to view the generated pages beneath this 
folder
   



View and Access Contents Information usually do the trick.
If not, google for VerboseSecurity - a great add-on product
that will help debug security issues.

 



Unfortunately VerboseSecurity seems not to work on Zope 2.7.5-final.
I think there are some security issues by my ZCLasses used within the
above mentioned folder. Is there any hack to agin more information
for security issues or for installing VerboseSecurity on this new Zope 
version.


Thanks in advance
Thomas Adams



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

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


Re: [Zope] newbie question

2005-05-25 Thread Florent Guillaume
Barry Drake  [EMAIL PROTECTED] wrote:
 I'm getting an error in CMFCore.utils in the
 _mergedLocalRoles function.  The error is:
 
 Exception Type  TypeError
 Exception Value can only concatenate tuple (not
 list)
 to tuple

Note, this problem is due to a non-core product somewhere incorrectly
managing local roles, and passing them as tuples instead of lists. All
the internals of Zope (and here, CMF) assume that __ac_local_roles__ is
a dict of string-list.

Florent


-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] newbie question

2005-05-24 Thread Barry Drake
I'm getting an error in CMFCore.utils in the
_mergedLocalRoles function.  The error is:

Exception Type  TypeError
Exception Value can only concatenate tuple (not
list)
to tuple

I modify utils.py, after saving a copy, in order to
obtain diagnostic output.  Then I delete utils.pyc,
after saving a copy, in order to force a recompile
(even used compilezpy.py for this a couple of times). 
Zope never seems to use the new version.

Also, I added comments ahead of the line where the
error occurs so that the line number should be higher
than the original error line number.  But, it's always
the same.

I suspect that I have a fundamental misunderstanding
of how Zope uses code in the Products directory.  

Is Zope storing all the compiled byte code in the
data.fs file?  Is there a way to force Zope to use new
code?

Also, the previous developer removed the Control Panel
putting Plone as the root of everything.  How can I
get information that the Control Panel usually
provides?

System: Zope 2.7.1, Plone 2.0.5, Python 2.3.4, Red Hat
7.2

Thank you.

Barry Drake

The traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module
Products.CMFFormController.ControllerPageTemplate,
line 80, in __call__
  Module
Products.CMFFormController.BaseControllerPageTemplate,
line 39, in _call
  Module Products.CMFFormController.ControllerBase,
line 243, in getNext
  Module
Products.CMFFormController.Actions.TraverseTo, line
36, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module
Products.CMFFormController.ControllerPythonScript,
line 159, in __call__
  Module Shared.DC.Scripts.Bindings, line 306, in
__call__
  Module Shared.DC.Scripts.Bindings, line 343, in
_bindAndExec
  Module Products.PythonScripts.PythonScript, line
323, in _exec
  Module None, line 19, in pag_edit
   - ControllerPythonScript at /Plone/pag_edit used
for /Plone/Members/bldrake/privLinks.pag
   - Line 19
  Module Products.CMFDefault.Document, line 192, in
edit
  Module Products.CMFCore.CMFCatalogAware, line 69, in
reindexObject
  Module Products.CMFCore.CatalogTool, line 262, in
reindexObject
  Module Products.CMFCore.CatalogTool, line 235, in
catalog_object
  Module Products.ZCatalog.ZCatalog, line 528, in
catalog_object
  Module Products.ZCatalog.Catalog, line 381, in
catalogObject
  Module Products.PluginIndexes.common.UnIndex, line
240, in index_object
  Module
Products.PluginIndexes.KeywordIndex.KeywordIndex, line
61, in _index_object
  Module
Products.PluginIndexes.KeywordIndex.KeywordIndex, line
94, in _get_object_keywords
  Module Products.CMFCore.CatalogTool, line 63, in
allowedRolesAndUsers

THE FOLLOWING ERROR SHOULD BE ON LINE 216 NOW, BUT
HASN'T MOVED FROM THE ORIGINAL.

  Module Products.CMFCore.utils, line 215, in
_mergedLocalRoles
TypeError: can only concatenate tuple (not list) to
tuple

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


Re: [Zope] newbie question

2005-05-24 Thread Phillip Hutchings
 I modify utils.py, after saving a copy, in order to
 obtain diagnostic output.  Then I delete utils.pyc,
 after saving a copy, in order to force a recompile
 (even used compilezpy.py for this a couple of times).
 Zope never seems to use the new version.

Restart Zope. Python will pick up the changes. Also, if you're
modifying security code, make sure you set
security-policy-implementation to Python in zope.conf, otherwise
you're using the C one, and no matter what changes you make to the
Python scripts you won't see any changes.

 I suspect that I have a fundamental misunderstanding
 of how Zope uses code in the Products directory.
 
 Is Zope storing all the compiled byte code in the
 data.fs file?  Is there a way to force Zope to use new
 code?

No. Refresh the product or restart Zope.

 Also, the previous developer removed the Control Panel
 putting Plone as the root of everything.  How can I
 get information that the Control Panel usually
 provides?

Find a heavy object, find the developer, bring the two together at
speed. Repeat until the problem is fixed.

yoursite/manage will get you to the control panel. If he's managed to
override /manage then you have problems...

And the real problem:

 TypeError: can only concatenate tuple (not list) to
 tuple

Like it says, you're supplying a list, you want a tuple. It looks like
you need to update PluginIndexes, I don't know where they come from.


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


Re: [Zope] newbie question

2005-05-24 Thread Barry Drake
Thank you Phillip.  I modified the zope.conf file as
you suggested and did

sudo ./zope stop

... usual msg

sudo ./zope start

... usual msg

Then generated the error.  The error log shows the
same output as before.  Not only should the line
number be one higher, I also put a dummy variable name
on that line to generate a stupid error msg.

How can it not be getting to that code?  I've searched
for another Zope instance, but found none.

Also, you are saying that I probably will never get
the Control Panel back on this site with Product
Management tools; no Product refresh then, I suppose. 
I'll have to thank the previous developer, as you
suggest!  (of course there is no documentation either,
arrgh!)

If you can think of anything else, I'd appreciated it.

Thanks.
Barry

--- Phillip Hutchings wrote:
  I modify utils.py, after saving a copy, in order
 to
  obtain diagnostic output.  Then I delete
 utils.pyc,
  after saving a copy, in order to force a recompile
  (even used compilezpy.py for this a couple of
 times).
  Zope never seems to use the new version.
 
 Restart Zope. Python will pick up the changes. Also,
 if you're
 modifying security code, make sure you set
 security-policy-implementation to Python in
 zope.conf, otherwise
 you're using the C one, and no matter what changes
 you make to the
 Python scripts you won't see any changes.
 
  I suspect that I have a fundamental
 misunderstanding
  of how Zope uses code in the Products directory.
  
  Is Zope storing all the compiled byte code in the
  data.fs file?  Is there a way to force Zope to use
 new
  code?
 
 No. Refresh the product or restart Zope.
 
  Also, the previous developer removed the Control
 Panel
  putting Plone as the root of everything.  How can
 I
  get information that the Control Panel usually
  provides?
 
 Find a heavy object, find the developer, bring the
 two together at
 speed. Repeat until the problem is fixed.
 
 yoursite/manage will get you to the control panel.
 If he's managed to
 override /manage then you have problems...
 
 And the real problem:
 
  TypeError: can only concatenate tuple (not list)
 to
  tuple
 
 Like it says, you're supplying a list, you want a
 tuple. It looks like
 you need to update PluginIndexes, I don't know where
 they come from.
 
 
 -- 
 Phillip Hutchings
 http://www.sitharus.com/
 [EMAIL PROTECTED] / [EMAIL PROTECTED]
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] newbie question

2005-05-24 Thread Phillip Hutchings
 Then generated the error.  The error log shows the
 same output as before.  Not only should the line
 number be one higher, I also put a dummy variable name
 on that line to generate a stupid error msg.
 
 How can it not be getting to that code?  I've searched
 for another Zope instance, but found none.

This is really odd. It sounds like it could be getting patched
somewhere. Try raising exceptions from various points in the method,
see if one gets there.

 Also, you are saying that I probably will never get
 the Control Panel back on this site with Product
 Management tools; no Product refresh then, I suppose.
 I'll have to thank the previous developer, as you
 suggest!  (of course there is no documentation either,
 arrgh!)
 
 If you can think of anything else, I'd appreciated it.

If the /manage URL has been overridden it's probably possible to fix
it. Try going to /manage_workspace, see if that works. Is Zope behind
a proxy? It's possible that it's being done with a URL rewrite
somewhere.

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


Re: [Zope] newbie question

2005-05-24 Thread Barry Drake
Thanks for your help.  I really needed another brain
to bounce things off of so I can get out of the rut
I'm in.  You've given me some fresh ideas to try.

Thanks.
Barry

--- Phillip Hutchings wrote:
  Then generated the error.  The error log shows the
  same output as before.  Not only should the line
  number be one higher, I also put a dummy variable
 name
  on that line to generate a stupid error msg.
  
  How can it not be getting to that code?  I've
 searched
  for another Zope instance, but found none.
 
 This is really odd. It sounds like it could be
 getting patched
 somewhere. Try raising exceptions from various
 points in the method,
 see if one gets there.
 
  Also, you are saying that I probably will never
 get
  the Control Panel back on this site with Product
  Management tools; no Product refresh then, I
 suppose.
  I'll have to thank the previous developer, as you
  suggest!  (of course there is no documentation
 either,
  arrgh!)
  
  If you can think of anything else, I'd appreciated
 it.
 
 If the /manage URL has been overridden it's probably
 possible to fix
 it. Try going to /manage_workspace, see if that
 works. Is Zope behind
 a proxy? It's possible that it's being done with a
 URL rewrite
 somewhere.
 
 -- 
 Phillip Hutchings
 http://www.sitharus.com/
 [EMAIL PROTECTED] / [EMAIL PROTECTED]
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] newbie question

2005-05-24 Thread J Cameron Cooper

Phillip Hutchings wrote:

Then generated the error.  The error log shows the
same output as before.  Not only should the line
number be one higher, I also put a dummy variable name
on that line to generate a stupid error msg.

How can it not be getting to that code?  I've searched
for another Zope instance, but found none.



This is really odd. It sounds like it could be getting patched
somewhere. Try raising exceptions from various points in the method,
see if one gets there.


It doesn't look like a monkey patch. Those aren't invisible in tracebacks.

Follow the code path higher until you do get some effect.


Also, you are saying that I probably will never get
the Control Panel back on this site with Product
Management tools; no Product refresh then, I suppose.
I'll have to thank the previous developer, as you
suggest!  (of course there is no documentation either,
arrgh!)

If you can think of anything else, I'd appreciated it.



If the /manage URL has been overridden it's probably possible to fix
it. Try going to /manage_workspace, see if that works. Is Zope behind
a proxy? It's possible that it's being done with a URL rewrite
somewhere.


I would imagine it's some sort of redirect. I would start with using the 
IP address: usually this is enough to avoid the redirect. Otherwise, 
find out how to turn access rule off. I think this may be in 
Zope/doc/SECURIY.txt.


I don't think it's possible to really remove the Zope Control Panel.

--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope-dev] Zope newbie question

2001-02-08 Thread Dieter Maurer

Bryan Baszczewski writes:
  Within my dtml, I am retrieving a text field from a database and passing
  this field to a javascript function.  However, the text field can be any
  length of characters and dtml keeps cutting the text off at no pre-set limit
  making it impossible to pass this field to javascript.  The javascript is
  going to take this text and pop it up in another window for the user to
  read.
DTML does not cut text, unless you tell it to do with the
"size" attribute.

  I checked the html source and everything looks fine, but when I execute it
  gives an "unterminated string" error.  Could Zope be causing this?
That sounds strange.
Unterminated string errors might be non local.
Maybe, the problem is much earlier in your code, a missing
or extraneous quote.

Are you sure your text from the database does not contain
unescaped quotes?


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-dev] Zope newbie question

2001-02-07 Thread Bryan Baszczewski


Within my dtml, I am retrieving a text field from a database and passing
this field to a javascript function.  However, the text field can be any
length of characters and dtml keeps cutting the text off at no pre-set limit
making it impossible to pass this field to javascript.  The javascript is
going to take this text and pop it up in another window for the user to
read.

I checked the html source and everything looks fine, but when I execute it
gives an "unterminated string" error.  Could Zope be causing this?

Bryan




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



Re: [Zope] Newbie question: HTTP variables

2001-01-13 Thread Michael Bernstein

Dean  Deb Ekstrand wrote:
 
 I'm trying to figure out Zope (on a time crunch, too), and I'm wondering how
 to do something.  How can I access HTTP variables in my DTML code?
 Specifically, I want to return code specific to the user's browser.  I know
 that HTTP has provisions for determing browser version, are those accessible
 in DTML and how?  If they are not accessible in DTML, is there a workaround
 (without oodles of javascript)?

these variables are part of the REQUEST namespace.
Specifically you can do

dtml-var "REQUEST.HTTP_USER_AGENT" to display the browswer
version. Creating conditional code is left as an excersize
for the student.

If you want to display a complete list of all HTTP REQUEST
variables, try this:

dtml-var REQUEST

 Another quick question:  I see that Zope 2.3 will have "Script" objects.
 What's the closest I can come in Zope 2.2.5?

The Python Method product:
http://www.zope.org/Members/4am/PythonMethod

Or external methods:
http://www.zope.org/Documentation/How-To/ExternalMethods

HTH,

Michael Bernstein

___
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] Newbie question: HTTP variables

2001-01-12 Thread Dean Deb Ekstrand

I'm trying to figure out Zope (on a time crunch, too), and I'm wondering how
to do something.  How can I access HTTP variables in my DTML code?
Specifically, I want to return code specific to the user's browser.  I know
that HTTP has provisions for determing browser version, are those accessible
in DTML and how?  If they are not accessible in DTML, is there a workaround
(without oodles of javascript)?

Another quick question:  I see that Zope 2.3 will have "Script" objects.
What's the closest I can come in Zope 2.2.5?

Thanks,
Michael


___
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] Newbie question: adding a tinyTables objec

2000-12-19 Thread peter bengtson

If a product contains only a Help object, it means that the product is a
Python Product, rather than a ZClass Product.

No broken box in front of the Product name, hmm...
Does Zope raise any errors when you try to start it? Try to remove the whole
TinyTable folder and reinstall it again after having had a second look in
the INSTALL or README docs. If there are any.

Don't give up my friend!


 No, that's the problem. The icon isn't a broken box, but a regular
 product icon. Clicking on the link shows that there's one item in
 TinyTablesPlus, a Help document; when I open that, it tells me that
 there are no items in TinyTablesPlus. So Zope seems to be seeing the
 product, but not adding a TinyTable to the list of Available Objects.
 Is there some setting that I need to change?

 Sorry to be so dense. It's tantalizing to have all this power so
 close at hand, and not be able to access it.

 Richard


 At 10:25 PM + 12/18/00, Peter Bengtsson wrote:
 Go to the Control Panel and click on Products. The TinyTable product
 is probably going to have a little "broken box"-icon.
 Click on it and wish that it will tell you the error so that you can fix
it.
 
 Good luck, Peter
 
   I'm running Zope on a Win98 machine; downloaded, unstuffed, and
   installed tinyTablesPlus folder in the lib\python\Products directory.
   TinyTablesPlus shows up in the product list of the
   Control_Panel/Products folder of my Zope installation. But it does
   not show up in the Available Objects pull-down menu in my Zope
   content folders. I can't figure out how to Add a TinyTables object.
 
   Can anyone help?
 
   Richard
 
   ___
   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 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] Newbie question - Link between Methods based on Authorization

2000-12-19 Thread Oliver Bleutgen

 I am still newbie in Zope, so my question may be stupid - sorry.

 I have problem with access to method. Example - There are two methods: A
 and
 B. Method A contains common information, accessible for all user (include
 anonymous). Source code in method B updates data for method A and access
 for
 method B is restrict only for users with roles "AdminTables". There is a
 link from method A to method B in the code of script A, and this link is
 viewable for all user (also for anonym). After click on this link, user is
 asked for authentication. So there is no problem, but HOW MAKE THIS LINK
 VIEWABLE ONLY FOR USER WITH AUTORIZATION FOR OBJEKT B ???

Try

http://zdp.zope.org/projects/zsnippet/snippets/DTMLContent/PermissionContent

and zdp.zope.org in general.

cheers,
oliver


___
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] Newbie question - Link between Methods based on Authorization

2000-12-19 Thread Timothy Wilson

On Tue, 19 Dec 2000, Michal Krejza wrote:

 I have problem with access to method. Example - There are two methods: A and
 B. Method A contains common information, accessible for all user (include
 anonymous). Source code in method B updates data for method A and access for
 method B is restrict only for users with roles "AdminTables". There is a
 link from method A to method B in the code of script A, and this link is
 viewable for all user (also for anonym). After click on this link, user is
 asked for authentication. So there is no problem, but HOW MAKE THIS LINK
 VIEWABLE ONLY FOR USER WITH AUTORIZATION FOR OBJEKT B ???

Hello Michal,

This may work:

dtml-if "AUTHENTICATED_USER.has_role('AdminTables', this())"
 a href="/link/to/method/B"Method B/a
/dtml-if

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.com/


___
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] Newbie question: adding a tinyTables object

2000-12-18 Thread Richard Blumberg

I'm running Zope on a Win98 machine; downloaded, unstuffed, and 
installed tinyTablesPlus folder in the lib\python\Products directory. 
TinyTablesPlus shows up in the product list of the 
Control_Panel/Products folder of my Zope installation. But it does 
not show up in the Available Objects pull-down menu in my Zope 
content folders. I can't figure out how to Add a TinyTables object.

Can anyone help?

Richard

___
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] Newbie question: adding a tinyTables object

2000-12-18 Thread Peter Bengtsson

Go to the Control Panel and click on Products. The TinyTable product is probably going 
to have a little "broken box"-icon. 
Click on it and wish that it will tell you the error so that you can fix it.

Good luck, Peter

 I'm running Zope on a Win98 machine; downloaded, unstuffed, and 
 installed tinyTablesPlus folder in the lib\python\Products directory. 
 TinyTablesPlus shows up in the product list of the 
 Control_Panel/Products folder of my Zope installation. But it does 
 not show up in the Available Objects pull-down menu in my Zope 
 content folders. I can't figure out how to Add a TinyTables object.
 
 Can anyone help?
 
 Richard
 
 ___
 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] Newbie question: adding a tinyTables object

2000-12-18 Thread Richard Blumberg

No, that's the problem. The icon isn't a broken box, but a regular 
product icon. Clicking on the link shows that there's one item in 
TinyTablesPlus, a Help document; when I open that, it tells me that 
there are no items in TinyTablesPlus. So Zope seems to be seeing the 
product, but not adding a TinyTable to the list of Available Objects. 
Is there some setting that I need to change?

Sorry to be so dense. It's tantalizing to have all this power so 
close at hand, and not be able to access it.

Richard


At 10:25 PM + 12/18/00, Peter Bengtsson wrote:
Go to the Control Panel and click on Products. The TinyTable product 
is probably going to have a little "broken box"-icon.
Click on it and wish that it will tell you the error so that you can fix it.

Good luck, Peter

  I'm running Zope on a Win98 machine; downloaded, unstuffed, and
  installed tinyTablesPlus folder in the lib\python\Products directory.
  TinyTablesPlus shows up in the product list of the
  Control_Panel/Products folder of my Zope installation. But it does
  not show up in the Available Objects pull-down menu in my Zope
  content folders. I can't figure out how to Add a TinyTables object.

  Can anyone help?

  Richard

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




Re: [Zope] newbie question -- database list/report with sort bycolumn header

2000-12-09 Thread Tino Wildenhain

Hi,


Chris Gray schrieb:
 
 Here's a fragment from a table that allows sorting by clicking the header
 in a dtml method named 'displayTable':
 
 table
 tr
 tha href="displayTable?sort_key=ID+desc"ID/a/th
 tha href="displayTable?sort_key=product"Product/a
 /tr
 dtml-in "SQLSelectQuery(sort_key=REQUEST['sort_key'])"
 
 Then feed sort_key into your SQLSelectQuery to use in an ORDER BY clause.
 
 select * from table order by dtml-var sort_key
 
You schould never do so. Unquoted variables in SQL-statements are high
security risc if they came from REQUEST. As an example someone can
send a string which ends a statement and begins a new one, like drop
table.
Instead reference only an index of a list with the columns to sort.

oder by dtml-sqlvar orderindex type=int is also a solution.
The index ranges from 1 to number of returned values.

Regards
Tino




 You can change the properties of an object in DTML by callling its
 manage_changeProperties method, for example:
 
 dtml-call expr="foo.manage_changeProperties(bar='New Value')"
 
 will changes the value of foo's bar property to 'New Value'.
 
 There are several ways of getting the effect of assigning variables in
 DTML, but it really isn't meant to have a direct way of declaring and
 assigning variables.  The way you're trying to use an object's properties
 will, I believe, cause problems in the case of simultaneous users, because
 it will act as a global variable.
 
 Cheers,
 Chris
 
 On Mon, 4 Dec 2000, John Cappelletti wrote:
 
 
  I am listing the results of a database query using dtml-in. I'd like to
  be able to give the user the option to re-sort the list by clicking on a
  column header. ok... I'm starting small with a form and radio buttons to
  allow the user to specify the sort.
 
  I've created what I believe to be a global variable for this page using
  the property screen. The variable is to capture the column name for the
  sort. My simple question is how do I assign a value to this variable
  inside of the dtml method! I'm not finding a description of variable
  assignment in the documentation (yeah, I must be missing the obvious).
 
  Any pointers would be appreciated.  (also, know if anyone has
  implemented interactive sort by column header?)

___
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] Newbie question, help with navigation method

2000-12-06 Thread Dieter Maurer

Richard Blumberg writes:
   Navigation works when called directly,
  does not work when included in "index_html" 
  
  Navigation:
  dtml-in objectValues
 

  Is this a bug in Zope, or am I doing something wrong?
Not directly.

Almost surely, your "index_html" is a DTML document.
A DTML document defines the method "objectValues" and it
returns the empty list.
One *might* think of this as a bug or a feature.
(I tend to think of it as a bug).

In a DTML document (unlike a DTML method), the object
is pushed on top of the namespace stack.
Therefore, the "objectValues" in your navigation object
is the "objectValues" of the "index_html" and it returns
"[]".

If you would make your "index_html" a DTML method,
then "objectValues" would be the method of the
object for which the method is called for. This
means your folder. And it would work.



Dieter

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




[Zope] Newbie question, help with navigation method

2000-12-05 Thread Richard Blumberg

I've a Zope newbie, trying to set up a Zope site at zope.org, and I'm 
running into problems with what seems like it should be a fairly 
simple navigation method.

I've replaced the standard_html_header and footer methods with my 
own, which create a simple two column table; I'm trying to get the 
navigation information into the left column. I've established a 
nav_title property on the two pages that I want to show up in the 
navigation list, with the values "Home" and "Biography", and I've 
written a nav_vertical method to display the list:

dtml-in objectValues
dtml-if nav_title
a href="dtml-absolute_url;"dtml-var nav_title/abr
/dtml-if
/dtml-in

I've embedded a call to that method in the standard_html_header method:

html
head
titledtml-var title_or_id/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head
body bgcolor="#FF"
table width="90%" border="0" cellpadding="8"
   tr
 td align="center"img 
src="http://www.zope.org/Members/rblumberg/images/rbRight" width="50" 
height="60"/td
 td valign="bottom"
   h2dtml-var title/h2
 /td
   /tr
   tr
 td valign="top"hr
dtml-var nav_vertical
hr/td
 td

(The table cells are closed in the standard_html_footer.)

Now, the nav_vertical method works exactly as planned when I call it directly:

http://www.zope.org/Members/rblumberg/nav_vertical

The header method also displays correctly (even without the closing 
tags, at least in MSIE 5) when it is called directly:

http://www.zope.org/Members/rblumberg/standard_html_header

But the pages which call the new header don't display the navigation list:

http://www.zope.org/Members/rblumberg/index_html

Is this a bug in Zope, or am I doing something wrong?

Richard

___
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] newbie question -- database list/report with sort bycolumn header

2000-12-04 Thread Chris Gray

Here's a fragment from a table that allows sorting by clicking the header
in a dtml method named 'displayTable':

table
tr
tha href="displayTable?sort_key=ID+desc"ID/a/th
tha href="displayTable?sort_key=product"Product/a
/tr
dtml-in "SQLSelectQuery(sort_key=REQUEST['sort_key'])"

Then feed sort_key into your SQLSelectQuery to use in an ORDER BY clause.

select * from table order by dtml-var sort_key

You can change the properties of an object in DTML by callling its
manage_changeProperties method, for example:

dtml-call expr="foo.manage_changeProperties(bar='New Value')"

will changes the value of foo's bar property to 'New Value'.

There are several ways of getting the effect of assigning variables in
DTML, but it really isn't meant to have a direct way of declaring and
assigning variables.  The way you're trying to use an object's properties
will, I believe, cause problems in the case of simultaneous users, because
it will act as a global variable.

Cheers,
Chris

On Mon, 4 Dec 2000, John Cappelletti wrote:

 
 I am listing the results of a database query using dtml-in. I'd like to
 be able to give the user the option to re-sort the list by clicking on a
 column header. ok... I'm starting small with a form and radio buttons to
 allow the user to specify the sort.
 
 I've created what I believe to be a global variable for this page using
 the property screen. The variable is to capture the column name for the
 sort. My simple question is how do I assign a value to this variable
 inside of the dtml method! I'm not finding a description of variable
 assignment in the documentation (yeah, I must be missing the obvious).
 
 Any pointers would be appreciated.  (also, know if anyone has
 implemented interactive sort by column header?)
 
 thanks,
 John Cappelletti
   AverStar, Inc.
   1593 Spring Hill Road, Suite 700
   Vienna, VA 22182-2249
   Tel: (703) 827-2606 x 4291 (also, 301 443-7509)
   Fax: (703) 827-5560
 
 
 
 ___
 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] newbie question -- database list/report with sort by column header

2000-12-03 Thread John Cappelletti


I am listing the results of a database query using dtml-in. I'd like to
be able to give the user the option to re-sort the list by clicking on a
column header. ok... I'm starting small with a form and radio buttons to
allow the user to specify the sort.

I've created what I believe to be a global variable for this page using
the property screen. The variable is to capture the column name for the
sort. My simple question is how do I assign a value to this variable
inside of the dtml method! I'm not finding a description of variable
assignment in the documentation (yeah, I must be missing the obvious).

Any pointers would be appreciated.  (also, know if anyone has
implemented interactive sort by column header?)

thanks,
John Cappelletti
  AverStar, Inc.
  1593 Spring Hill Road, Suite 700
  Vienna, VA 22182-2249
  Tel: (703) 827-2606 x 4291 (also, 301 443-7509)
  Fax: (703) 827-5560



___
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] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler

I want the user to be sent to a particular URL after calling the
product's manage_add method. How can I do that?
The URL I want is REQUEST['URL3'].

I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
RESPONSE doesn't seem to exist here.


-- 
.paul winkler..
slinkP arts:   music, sound, illustration, design, etc.
   web page:  http://www.slinkp.com
  A member of ARMS:   http://www.reacharms.com

___
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] newbie question: Redirect from Python?

2000-11-27 Thread seb bacon

* Paul Winkler [EMAIL PROTECTED] [001127 19:54]:
 I want the user to be sent to a particular URL after calling the
 product's manage_add method. How can I do that?
 The URL I want is REQUEST['URL3'].
 
 I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
 RESPONSE doesn't seem to exist here.

sounds alright to me.  are you calling it in quotes, e.g. dtml-var
"RESPONSE.redirect(REQUEST['URL3'])" ?

you shouldn't have to use the REQUEST to look up the variable, either:
dtml-var "RESPONSE.redirect(URL3)"


___
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] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler

seb bacon wrote:
 
 * Paul Winkler [EMAIL PROTECTED] [001127 19:54]:
  I want the user to be sent to a particular URL after calling the
  product's manage_add method. How can I do that?
  The URL I want is REQUEST['URL3'].
 
  I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
  RESPONSE doesn't seem to exist here.
 
 sounds alright to me.  are you calling it in quotes, e.g. dtml-var
 "RESPONSE.redirect(REQUEST['URL3'])" ?
 
 you shouldn't have to use the REQUEST to look up the variable, either:
 dtml-var "RESPONSE.redirect(URL3)"

Thanks for the reply.
OK, I didn't phrase the question correctly.

I think it boils down to this:
If I have a string that represents a URL, can I define a method of my
product (in python, not in DTML) that redirects the browser to that
URL?

More details:


My product code is based on Boring (like most newbies I guess).
But manage_addBoring() does not do quite what I want. It returns
self.manage_main(self, REQUEST), so they end up at a long and ugly URL
that isn't where I want them to be anyway.

Example:
 the user is at:

http://localhost.localdomain:8080/Members/bobby

Bobby then clicks on a button I've provided that says "Add Test
Product". That sends him to the add form I've created. When Bobby
submits the request from this form, the product is added and he's sent
to

http://localhost.localdomain:8080/Members/bobby/manage_addProduct/MyProduct/manage_main
 

...because manage_addMyProduct returns self.manage_main
So I understand what's happening, but it's not what I want.
I don't want to send him there, I want to send him back to 

http://localhost.localdomain:8080/Members/bobby

So how can I do that from within the manage_addMyProduct method
definition?
The method gets a REQUEST argument, and I know that REQUEST['URL3'] is
what I want because if I return that string, it prints the URL I want.

I could do it by returning an HTML page with a redirect in the head
but that seems like a horribly ugly solution.


Looking through various Zope docs, I thought RESPONSE.redirect might
work, but  RESPONSE is not mentioned anywhere in Boring.py. Boring
only uses REQUEST.


-- 
.paul winkler..
slinkP arts:   music, sound, illustration, design, etc.
   web page:  http://www.slinkp.com
  A member of ARMS:   http://www.reacharms.com

___
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] newbie question: Redirect from Python?

2000-11-27 Thread Michel Pelletier

Paul Winkler wrote:
 
 seb bacon wrote:
 
  * Paul Winkler [EMAIL PROTECTED] [001127 19:54]:
   I want the user to be sent to a particular URL after calling the
   product's manage_add method. How can I do that?
   The URL I want is REQUEST['URL3'].
  
   I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
   RESPONSE doesn't seem to exist here.
 
  sounds alright to me.  are you calling it in quotes, e.g. dtml-var
  "RESPONSE.redirect(REQUEST['URL3'])" ?
 
  you shouldn't have to use the REQUEST to look up the variable, either:
  dtml-var "RESPONSE.redirect(URL3)"
 
 Thanks for the reply.
 OK, I didn't phrase the question correctly.
 
 I think it boils down to this:
 If I have a string that represents a URL, can I define a method of my
 product (in python, not in DTML) that redirects the browser to that
 URL?
 
 More details:
 
 My product code is based on Boring (like most newbies I guess).
 But manage_addBoring() does not do quite what I want. It returns
 self.manage_main(self, REQUEST), so they end up at a long and ugly URL
 that isn't where I want them to be anyway.
 
 Example:
  the user is at:
 
 http://localhost.localdomain:8080/Members/bobby
 
 Bobby then clicks on a button I've provided that says "Add Test
 Product". That sends him to the add form I've created. When Bobby
 submits the request from this form, the product is added and he's sent
 to
 
 
http://localhost.localdomain:8080/Members/bobby/manage_addProduct/MyProduct/manage_main
 
 ...because manage_addMyProduct returns self.manage_main
 So I understand what's happening, but it's not what I want.
 I don't want to send him there, I want to send him back to
 
 http://localhost.localdomain:8080/Members/bobby
 
 So how can I do that from within the manage_addMyProduct method
 definition?
 The method gets a REQUEST argument, and I know that REQUEST['URL3'] is
 what I want because if I return that string, it prints the URL I want.
 
 I could do it by returning an HTML page with a redirect in the head
 but that seems like a horribly ugly solution.
 
 Looking through various Zope docs, I thought RESPONSE.redirect might
 work, but  RESPONSE is not mentioned anywhere in Boring.py. Boring
 only uses REQUEST.

So pass it RESPONSE:

def manage_addMyProduct(self, blah, blah, REQUEST=None, RESPONSE=None):
  ...

The publisher will automaticaly pass you RESPONSE if you ask for it as a
method argument.  Now use RESPONSE.redirect.

-Michel

___
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] newbie question: Redirect from Python?

2000-11-27 Thread Phil Harris

You need to be careful when redirecting from an external Python wotsit.

RESPONSE.redirect raises an exception which can make the transaction get
rolled back.

This seems not to happen when called from dtml but I've seen it happen from
an external Python wotsit.

Note:

My use of wotsit above in no way has a bearing on the new name for the
Python Methods/ZMethods/Script or whatever the hell they are called now. ;)

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Paul Winkler" [EMAIL PROTECTED]
To: "Zope mailing list" [EMAIL PROTECTED]
Sent: Monday, November 27, 2000 6:26 PM
Subject: [Zope] newbie question: Redirect from Python?


| I want the user to be sent to a particular URL after calling the
| product's manage_add method. How can I do that?
| The URL I want is REQUEST['URL3'].
|
| I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
| RESPONSE doesn't seem to exist here.
|
|
| --
| .paul winkler..
| slinkP arts:   music, sound, illustration, design, etc.
|web page:  http://www.slinkp.com
|   A member of ARMS:   http://www.reacharms.com
|
| ___
| 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] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler

Michel Pelletier wrote:
 
 Paul Winkler wrote:
(snip)
  Looking through various Zope docs, I thought RESPONSE.redirect might
  work, but  RESPONSE is not mentioned anywhere in Boring.py. Boring
  only uses REQUEST.
 
 So pass it RESPONSE:
 
 def manage_addMyProduct(self, blah, blah, REQUEST=None, RESPONSE=None):
   ...
 
 The publisher will automaticaly pass you RESPONSE if you ask for it as a
 method argument.  Now use RESPONSE.redirect.

Aha, thanks. I didn't know that about the publisher.

Now I'm afraid I'm too stupid to see how to use RESPONSE.redirect
after reading the description in the Zope Book API appendix.

My method now looks like this:

def manage_addMyProduct(self, id, title='', REQUEST=None,
RESPONSE=None):
"""Add a MyProduct instance to the folder."""
self._setObject(id, MyProduct(id, title))
if REQUEST is not None:
whereto= REQUEST['URL3']
return RESPONSE.redirect(whereto, 0)


That just prints the URL as a string.
OK, so maybe I'm not supposed to use the return value?
So I try it like this:


def manage_addMyProduct(self, id, title='', REQUEST=None,
RESPONSE=None):
"""Add a MyProduct instance to the folder."""
self._setObject(id, MyProduct(id, title))
if REQUEST is not None:
whereto= REQUEST['URL3']
RESPONSE.redirect(whereto, 0)


Now when I submit the form, I can wait for a result forever and not
get anything.

How am I *really* supposed to do it?




-- 
.paul winkler..
slinkP arts:   music, sound, illustration, design, etc.
   web page:  http://www.slinkp.com
  A member of ARMS:   http://www.reacharms.com



___
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] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler

Dieter Maurer wrote:
 
 If you need it in the constructor, then you must
 either pass in an object that is tied by acquisition
 or REQUEST or RESPONSE itself,
 or you must move the call out into the method
 "manage_afterAdd" (where the object already is tied in).

Well, I don't have that method. Went to learn about what people use it
for - searched for manage_afterAdd on zope.org and got nothing at
all???

Anyway, I'm now redirecting in manage_Add and it seems to work fine.
 
-- 
.paul winkler..
slinkP arts:   music, sound, illustration, design, etc.
   web page:  http://www.slinkp.com
  A member of ARMS:   http://www.reacharms.com

___
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] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler

OK, this seems to work.

def manage_addMyProduct(self, id, title='', REQUEST=None,
RESPONSE=None):
self._setObject(id, MyProduct(id, title))
if REQUEST is not None:
whereto= REQUEST['URL3']
RESPONSE.redirect(whereto, lock=0) 




-- 
.paul winkler..
slinkP arts:   music, sound, illustration, design, etc.
   web page:  http://www.slinkp.com
  A member of ARMS:   http://www.reacharms.com

___
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] Newbie Question

2000-11-24 Thread Dany Rioux

I'm probably just being dumb... :)

PASTE--
dtml-var standard_html_header

p
dtml-with News
 dtml-in objectValues
 /dtml-in
/dtml-with
/p

dtml-var standard_html_footer
/PASTE--

This doesn't work. Nothing gets printed.

In the News folder is a DTML method called news999. Should it be a
DTML document instead for this to work?

I tried the three methods you gave me. objectValues, "objectValues()"
and "objectValues('[File]')" and even "objectValues('[news999]')" but
empty everytime.

TIA

Dany

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Andy
 McKay
 Sent: Thursday, November 23, 2000 7:00 PM
 To: Chris Withers
 Cc: Dany Rioux; Zope Mailing List
 Subject: Re: [Zope] Newbie Question


 Or even: dtml-in "objectValues(['File'])"
 if this news thing is a file ;-P

  Or even:
 
  dtml-in objectValues
 
  ;-)
 
  Chris
 
  Andy McKay wrote:
  
   dtml-in "objectValues()"
  
   --
   From: "Dany Rioux" [EMAIL PROTECTED]
  
Hi everyone,
   
Simple newbie question... :)
   
I've made a directory called News into which I will
 put files named
newsXXX. X being a number from 999 to 001.
   
What I want to do is to tell zope to put each file
 into a document.
Now, here is what I figured out.
   
dtml-with News
  dtml-in ??? --- that's where I'm stuck. I don't
 know how to
iterate through a directory ... I want ALL the
 newsXXX displayed.
  /dtml-in
/dtml-with
   
How do I do that?
   
TIA
   
Dany


___
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] Newbie Question

2000-11-24 Thread Philipp Dunkel


 I'm probably just being dumb... :)
 
 PASTE--
 dtml-var standard_html_header
 
 p
 dtml-with News
  dtml-in objectValues
 
   dtml-var "_['sequence-item']"

  /dtml-in
 /dtml-with
 /p
 
 dtml-var standard_html_footer

this should work out for you.

cu

Philipp


___
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] Newbie Question

2000-11-24 Thread Jim Washington

Dany:


These should work:


dtml-in objectIds

dtml-var "_['sequence-item']"

/dtml-in

-or-


dtml-in objectValues

dtml-var sequence-item
 
/dtml-in

-or-

dtml-in objectValues

dtml-var some_attribute_of_the_sequence-item
 
/dtml-in


--Jim Washington

Dany Rioux wrote:
 
 I'm probably just being dumb... :)
 
 PASTE--
 dtml-var standard_html_header
 
 p
 dtml-with News
  dtml-in objectValues
  /dtml-in
 /dtml-with
 /p
 
 dtml-var standard_html_footer
 /PASTE--
 
 This doesn't work. Nothing gets printed.
 
 In the News folder is a DTML method called news999. Should it be a
 DTML document instead for this to work?
 
 I tried the three methods you gave me. objectValues, "objectValues()"
 and "objectValues('[File]')" and even "objectValues('[news999]')" but
 empty everytime.


___
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] Newbie Question Fixed but continuing.

2000-11-24 Thread Dany Rioux

Thanks Philipp and Jim,

It worked! But... (there's always a but! :) I thought I was clever
when I thought about naming my news files news999, news998 etc,
thinking it would parse the directory and print the news sorted by
their names. So news998 would be printed before news999 etc. It
doesn't.

deleted questions because it's fixed :) /deleted

Now this too is fixed. I just discovered the "sort=" thingie.

One thing would sure be helpful, a Guide explaining all the subtags in
a tag. Like what can be used in a dtml-var or dtml-in and params
for each subtag. Because as someone mentioned, searching on zope is a
real hassle. It takes a long time, and the search is ORed. So lots of
unrelated docs are counted as a hit.

Thanks a lot to all the helpers.

Dany

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 Philipp Dunkel
 Sent: Friday, November 24, 2000 5:00 PM
 To: Zope Mailing List
 Subject: Re: [Zope] Newbie Question



  I'm probably just being dumb... :)
 
  PASTE--
  dtml-var standard_html_header
 
  p
  dtml-with News
   dtml-in objectValues

dtml-var "_['sequence-item']"

   /dtml-in
  /dtml-with
  /p
 
  dtml-var standard_html_footer

 this should work out for you.

 cu

 Philipp


___
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] Newbie Question Fixed but continuing.

2000-11-24 Thread Michel Pelletier

Dany Rioux wrote:
 
 Thanks Philipp and Jim,
 
 It worked! But... (there's always a but! :) I thought I was clever
 when I thought about naming my news files news999, news998 etc,
 thinking it would parse the directory and print the news sorted by
 their names. So news998 would be printed before news999 etc. It
 doesn't.
 
 deleted questions because it's fixed :) /deleted
 
 Now this too is fixed. I just discovered the "sort=" thingie.
 
 One thing would sure be helpful, a Guide explaining all the subtags in
 a tag. Like what can be used in a dtml-var or dtml-in and params
 for each subtag. 

http://www.zope.org/Members/michel/ZB/AppendixA.html

This DTML reference is also included in the Online Help System with Zope
2.4b1 and beyond.

-Michel

___
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] Newbie Question Fixed but continuing.

2000-11-24 Thread Dany Rioux

Thanks! That's exactly what I was looking for.

I know that the DTML reference is there on Zope.org but it's a hassle
and well, I'll keep my other opinions for myself.

Anyway. Here's an idea. Shouldn't there be a list FAQ? If there is one
it should be sent when subscribing. Or it could be requested. I'm
pretty sure most of the questions I sent have already been sent 
answered more than once already and I know some that most other FAQs
use one. So, why not zope general list? It *is* possible, though
unlikely, that there is a list FAQ mentionned in the "Welcome to Zope
mailing list" email but if there is, my apologies.

Thanks.

Dany

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Michel Pelletier
 Sent: Friday, November 24, 2000 12:17 PM
 To: Dany Rioux
 Cc: Zope Mailing List
 Subject: Re: [Zope] Newbie Question Fixed but continuing.


 Dany Rioux wrote:
 
  Thanks Philipp and Jim,
 
  It worked! But... (there's always a but! :) I thought I was clever
  when I thought about naming my news files news999, news998 etc,
  thinking it would parse the directory and print the news sorted by
  their names. So news998 would be printed before news999 etc. It
  doesn't.
 
  deleted questions because it's fixed :) /deleted
 
  Now this too is fixed. I just discovered the "sort=" thingie.
 
  One thing would sure be helpful, a Guide explaining all
 the subtags in
  a tag. Like what can be used in a dtml-var or dtml-in
 and params
  for each subtag.

 http://www.zope.org/Members/michel/ZB/AppendixA.html

 This DTML reference is also included in the Online Help
 System with Zope
 2.4b1 and beyond.


___
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] Newbie Question

2000-11-24 Thread Chalu Kim


dtml-with myFolder
dtml-in "objectValues(['DTML Document',])"
dtml-var "_['sequence-item']"
/dtml-in
/dtml-with

Dany Rioux wrote:
 
 I'm probably just being dumb... :)
 
 PASTE--
 dtml-var standard_html_header
 
 p
 dtml-with News
  dtml-in objectValues
  /dtml-in
 /dtml-with
 /p
 
 dtml-var standard_html_footer
 /PASTE--
 
 This doesn't work. Nothing gets printed.
 
 In the News folder is a DTML method called news999. Should it be a
 DTML document instead for this to work?
 
 I tried the three methods you gave me. objectValues, "objectValues()"
 and "objectValues('[File]')" and even "objectValues('[news999]')" but
 empty everytime.
 
 TIA
 
 Dany
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
  Behalf Of Andy
  McKay
  Sent: Thursday, November 23, 2000 7:00 PM
  To: Chris Withers
  Cc: Dany Rioux; Zope Mailing List
  Subject: Re: [Zope] Newbie Question
 
 
  Or even: dtml-in "objectValues(['File'])"
  if this news thing is a file ;-P
 
   Or even:
  
   dtml-in objectValues
  
   ;-)
  
   Chris
  
   Andy McKay wrote:
   
dtml-in "objectValues()"
   
--
From: "Dany Rioux" [EMAIL PROTECTED]
   
 Hi everyone,

 Simple newbie question... :)

 I've made a directory called News into which I will
  put files named
 newsXXX. X being a number from 999 to 001.

 What I want to do is to tell zope to put each file
  into a document.
 Now, here is what I figured out.

 dtml-with News
   dtml-in ??? --- that's where I'm stuck. I don't
  know how to
 iterate through a directory ... I want ALL the
  newsXXX displayed.
   /dtml-in
 /dtml-with

 How do I do that?

 TIA

 Dany
 
 ___
 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] Newbie Question

2000-11-23 Thread Dany Rioux

Hi everyone,

Simple newbie question... :)

I've made a directory called News into which I will put files named
newsXXX. X being a number from 999 to 001.

What I want to do is to tell zope to put each file into a document.
Now, here is what I figured out.

dtml-with News
  dtml-in ??? --- that's where I'm stuck. I don't know how to
iterate through a directory ... I want ALL the newsXXX displayed.
  /dtml-in
/dtml-with

How do I do that?

TIA

Dany

---.oo0O--O0oo.

Dany Rioux  UnderSoft Inc.
Business
www.dating-reviews.com
[EMAIL PROTECTED]

Personal
www.drioux.com
[EMAIL PROTECTED]

---.o00O---O00o.---


BEGIN:VCARD
VERSION:2.1
N:Rioux;Dany;;M
FN:Dany Rioux
ORG:UnderSoft Inc.
TITLE:President
TEL;WORK;VOICE:(506) 753-7515
ADR;WORK:;;78B Roseberry St;Campbellton;NB;E3N 2G7;Canada
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:78B Roseberry St=0D=0ACampbellton, NB E3N 2G7=0D=0ACanada
X-WAB-GENDER:2
BDAY:20010710
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
REV:20001122T152751Z
END:VCARD



Re: [Zope] Newbie Question

2000-11-23 Thread Andy McKay

dtml-in "objectValues()"

--
  Andy McKay, Developer.
  ActiveState.
- Original Message - 
From: "Dany Rioux" [EMAIL PROTECTED]
To: "Zope Mailing List" [EMAIL PROTECTED]
Sent: Thursday, November 23, 2000 2:20 PM
Subject: [Zope] Newbie Question


 Hi everyone,
 
 Simple newbie question... :)
 
 I've made a directory called News into which I will put files named
 newsXXX. X being a number from 999 to 001.
 
 What I want to do is to tell zope to put each file into a document.
 Now, here is what I figured out.
 
 dtml-with News
   dtml-in ??? --- that's where I'm stuck. I don't know how to
 iterate through a directory ... I want ALL the newsXXX displayed.
   /dtml-in
 /dtml-with
 
 How do I do that?
 
 TIA
 
 Dany
 
 ---.oo0O--O0oo.
 
 Dany Rioux UnderSoft Inc.
 Business
 www.dating-reviews.com
 [EMAIL PROTECTED]
 
 Personal
 www.drioux.com
 [EMAIL PROTECTED]
 
 ---.o00O---O00o.---
 


___
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] Newbie Question

2000-11-23 Thread Chris Withers

Or even:

dtml-in objectValues

;-)

Chris

Andy McKay wrote:
 
 dtml-in "objectValues()"
 
 --
   Andy McKay, Developer.
   ActiveState.
 - Original Message -
 From: "Dany Rioux" [EMAIL PROTECTED]
 To: "Zope Mailing List" [EMAIL PROTECTED]
 Sent: Thursday, November 23, 2000 2:20 PM
 Subject: [Zope] Newbie Question
 
  Hi everyone,
 
  Simple newbie question... :)
 
  I've made a directory called News into which I will put files named
  newsXXX. X being a number from 999 to 001.
 
  What I want to do is to tell zope to put each file into a document.
  Now, here is what I figured out.
 
  dtml-with News
dtml-in ??? --- that's where I'm stuck. I don't know how to
  iterate through a directory ... I want ALL the newsXXX displayed.
/dtml-in
  /dtml-with
 
  How do I do that?
 
  TIA
 
  Dany
 
  ---.oo0O--O0oo.
 
  Dany Rioux UnderSoft Inc.
  Business
  www.dating-reviews.com
  [EMAIL PROTECTED]
 
  Personal
  www.drioux.com
  [EMAIL PROTECTED]
 
  ---.o00O---O00o.---
 
 
 ___
 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] Newbie Question

2000-11-23 Thread Andy McKay

Or even: dtml-in "objectValues(['File'])"
if this news thing is a file ;-P
--
  Andy McKay, Developer.
  ActiveState.
- Original Message - 
From: "Chris Withers" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]
Cc: "Dany Rioux" [EMAIL PROTECTED]; "Zope Mailing List" [EMAIL PROTECTED]
Sent: Thursday, November 23, 2000 2:47 PM
Subject: Re: [Zope] Newbie Question


 Or even:
 
 dtml-in objectValues
 
 ;-)
 
 Chris
 
 Andy McKay wrote:
  
  dtml-in "objectValues()"
  
  --
Andy McKay, Developer.
ActiveState.
  - Original Message -
  From: "Dany Rioux" [EMAIL PROTECTED]
  To: "Zope Mailing List" [EMAIL PROTECTED]
  Sent: Thursday, November 23, 2000 2:20 PM
  Subject: [Zope] Newbie Question
  
   Hi everyone,
  
   Simple newbie question... :)
  
   I've made a directory called News into which I will put files named
   newsXXX. X being a number from 999 to 001.
  
   What I want to do is to tell zope to put each file into a document.
   Now, here is what I figured out.
  
   dtml-with News
 dtml-in ??? --- that's where I'm stuck. I don't know how to
   iterate through a directory ... I want ALL the newsXXX displayed.
 /dtml-in
   /dtml-with
  
   How do I do that?
  
   TIA
  
   Dany
  
   ---.oo0O--O0oo.
  
   Dany Rioux UnderSoft Inc.
   Business
   www.dating-reviews.com
   [EMAIL PROTECTED]
  
   Personal
   www.drioux.com
   [EMAIL PROTECTED]
  
   ---.o00O---O00o.---
  
  
  ___
  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 )




Re: [Zope] Newbie question(s)

2000-11-13 Thread Rik Hoekstra



"Bowyer, Alex" wrote:
 
 Hi,
 
 I have what I'm sure is a very simple question about Zope programming style:
 I want to count how many objects are contained in the current container
 object and then do something with that value, but I can't do the bit I need
 to do at the point of reading the count variable because I am in the wrong
 namespace.
 I can't begin a dtml-let because I would need to close dtml-if before
 dtml-let, which is not allowed.
 
 dtml-in objectValues
 dtml-if sequence-end
 dtml-var count-id  !-- this is the value I want to use --
 /dtml-if
 /dtml-in
 !-- this is the scope in which I want to do something with the value. --
 

try (untested):

dtml-call expr="REQUEST.set('countids', _.len(objectValues())"
dtml-in objectValues
dtml-if sequence-end
dtml-var countids
/dtml-if
/dtml-in
!-- do something with the value. --



 What is the "accepted" way of passing a value into a different scope? Do I
 have do a REQUEST.set or is there a tidier way?

dtml-let

 Also I think I read somewhere that you can use the object.subobject or
 object.property syntax but I never got that to work, what's the catch?

dtml-var expr="object.subobject"

note that this is a Python expression and the code between quotes has
Python behaviour.
 

 
 One last thing, I sent a couple of mails to the list about problems I had
 with manage_delObjects. I still haven't got it to work. Since the best way
 to learn Zope is by example, I wonder if anyone could direct me to a sample
 piece of code where a container of some sort deletes one of its children
 subobjects?
 


try (untested):
dtml-call "subobject.manage_delObjects([id1, id2, ..])"


hth

Rik

___
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] Newbie question(s)

2000-11-12 Thread Bowyer, Alex

Hi,

I have what I'm sure is a very simple question about Zope programming style:
I want to count how many objects are contained in the current container
object and then do something with that value, but I can't do the bit I need
to do at the point of reading the count variable because I am in the wrong
namespace.
I can't begin a dtml-let because I would need to close dtml-if before
dtml-let, which is not allowed.

dtml-in objectValues
dtml-if sequence-end
dtml-var count-id  !-- this is the value I want to use --
/dtml-if
/dtml-in
!-- this is the scope in which I want to do something with the value. --

What is the "accepted" way of passing a value into a different scope? Do I
have do a REQUEST.set or is there a tidier way?
Also I think I read somewhere that you can use the object.subobject or
object.property syntax but I never got that to work, what's the catch?

One last thing, I sent a couple of mails to the list about problems I had
with manage_delObjects. I still haven't got it to work. Since the best way
to learn Zope is by example, I wonder if anyone could direct me to a sample
piece of code where a container of some sort deletes one of its children
subobjects?

Thanks very much for your help,

Alex

==
Alex Bowyer
IT Contractor, Logica Australasia
Tel: +61 2 9202 8130
Fax: +61 2 9922 7466
E-mail : [EMAIL PROTECTED]
WWW: http://www.logica.com.au/
==

___
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] Newbie question(s)

2000-11-12 Thread Max M

From: Bowyer, Alex

I want to count how many objects are contained in the current container
object and then do something with that value, but I can't do the bit I 
need to do at the point of reading the count variable because I am in 
the wrong namespace.

I would try and do it like this (untested):

dtml-call "REQUEST.set('itemCount', len(objectIds()))"

Regards

Max M

___
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] Newbie question(s)

2000-11-12 Thread Bowyer, Alex

 I want to count how many objects are contained in the 
 current container
 object and then do something with that value, but I can't do 
 the bit I 
 need to do at the point of reading the count variable 
 because I am in 
 the wrong namespace.
 
 I would try and do it like this (untested):
 
 dtml-call "REQUEST.set('itemCount', len(objectIds()))"
 
 Regards
 
 Max M

Thanks Max, that is certainly useful in this case.

My query is really more general though, that was just an example, I need to
know what the generally accepted method is for transferring values through
the code (i.e between namespaces)

IMHO as far as Zope documentation goes, the thing that is really lacking is
a document introducing people to how to program in Zope, explaining the
overlaps between Python and Zope/DTML and explaining the different syntaxes
for calling variables, methods etc? There are a lot of references on
specific functions, methods etc but no general overview. Maybe the
forthcoming Zope book will address this better.

I am also still looking for example code using manage_delObjects.

Thanks,

Alex

==
Alex Bowyer
IT Contractor, Logica Australasia
Tel: +61 2 9202 8130
Fax: +61 2 9922 7466
E-mail : [EMAIL PROTECTED]
WWW: http://www.logica.com.au/
==

___
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] Newbie question(s)

2000-11-12 Thread Morten W. Petersen

[Alex Bowyer]

| My query is really more general though, that was just an example, I need to
| know what the generally accepted method is for transferring values through
| the code (i.e between namespaces)

Unless I've misunderstood your problem, wouldn't dtml-let do the trick?
(See DTML manual for more info).

-Morten

___
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] Newbie question(s)

2000-11-12 Thread Max M

From: Bowyer, Alex

My query is really more general though, that was just an example,
I need to know what the generally accepted method is for
transferring values through the code (i.e between namespaces)

I do believe that our ugly friend REQUEST.set() is the way to go here. I
cannot remember having seen any other way of doing it. I expect that better
days will be here with v.2.3 as we will get Python Methods, or whatever they
are called.

I am also still looking for example code using manage_delObjects.

Sorry I cannot help there.

Regards
Max M


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

2000-11-06 Thread Brown Fox

Hello,
i want to view a dtml-document, calling it as
a variable.
For example:

dtml-var standard_html_header
h2dtml-var title_or_id/h2
p
dtml-var testfile
P
dtml-var standard_html_footer

where this file is called with this string:
a href="test3?testfile=Running"test3/A

The result i now get is the id, not the content of the
file!

Thanks,
Bruno



__
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it

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

2000-10-24 Thread Chris Withers

Hi Kathy,

 Error Type: SyntaxError
 
 Error Value: invalid syntax
 
 Troubleshooting Suggestions

It looks like your addEntry.py file has some syntax mistakes in it
(think mis-spelled, badly indented or otherwise defective python ;-) Try
comparing it with what it should be and see if the problem goes away
when you correct any mistakes.

cheers,

Chris

PS: Please post only plain text to this list (Plain Text as opposed to
MIME encoded should be an option on your mail program) as the message
you posted came out pretty screwed up on Netscape Communicator ;-)

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

2000-10-23 Thread Kathy Hester






Hello and thanks for your patience!I am beginning to learn zope. I am going through the tutorials in the book. I have run into a problem creating an external method.I know I must be doing something stupid!I have my addEntry.py saved in the Extension folder in the Zope folder as it installed it (i'm in win 2k). I have the dtml method to call addEntry.When I try to add an external method id/function name/file name are all addEntry. (Supposedly to keep me from messing up...). I get this error message- Zope has encountered an error while publishing this resource. Error Type: SyntaxError

Error Value: invalid syntax

Troubleshooting SuggestionsThe URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. There must be a simple solution. I have looked at the o'reilly book/on-line docs/how tos and I am still not seeing my error. Please feel free to e-mail me directly at [EMAIL PROTECTED].I thought I had found a work around by installing python method  but I am not sure what I need to put in the parameter list. Any help would be greatly appreciated!=Kathy Hesterto feel powerful oftento act powerful sometimesto overpower others seldomto share power whenever possible- unknown










Re: [Zope] Newbie question : ZopeTime permissions

2000-10-16 Thread Manuel Amador (Rudd-O)


access contents information
I guess.
Aaron Straup Cope wrote:
Hi,
My name is Aaron.
I am trying to set up zope with (atleast) three roles : manager, admin,
user.
I'd like to give the last two the bare minimum Security permissions
possible and adding them as needed later on.
My problem is that I can't seem to figure out, specifically, which
permissions to give a user that will allow them to read ZopeTime().
(see below)
For the admin user, I have set the Access content information and View
*
options globally. I've tried guessing at some others, but there are
alot
of possible combinations to try so I thought maybe I would just ask.
Related, is there a detailed description of the default Security
settings? I've checked the mailing lists and the Zope docs and if it's
there, I guess I missed it.
Thanks,
dtml-call "REQUEST.set('ts', ZopeTime())">
dtml-call "REQUEST.set('foo',_.str(_.int(ts)))">
dtml-var foo>
Traceback (innermost last):
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
222, in
publish_module
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
187, in
publish
 File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221,
in
zpublisher_exception_hook
 (Object: Traversable)
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
171, in
publish
 File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line
160, in
mapply
 (Object: test)
 File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line
112, in
call_object
 (Object: test)
 File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line
177, in
__call__
 (Object: test)
 File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py,
line
528, in __call__
 (Object: test)
 File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py,
line
337, in eval
 (Object: REQUEST.set('ts', ZopeTime()))
 (Info: REQUEST)
 File string>, line 0, in ?
NameError: (see above)
___
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
)

--
Manuel Amador (Rudd-O)



Re: [Zope] Newbie question : ZopeTime permissions

2000-10-10 Thread Aaron Straup Cope

Yes, it was a misunderstanding regarding basic user permissions and the
Anonymous role on my part.

I did not want to allow the Anonymous role *any* permissions, and the
site I am working in is contained in a folder beneath the root Zope
folder. 

The problem was that I had disabled the "Access contents
information" privilege for the Anonymous user (whose permissions I forgot
are inherited by all other users) at the root level, thus preventing Joe
User from being able to access internals(?) like
ZopeTime even if [it] had permissions at a sub-directory level.

If I've got it wrong, I would be grateful if someone would correct
me. Otherwise, I hope that helps other newbies who find themselves in a
similar situation.

On Sun, 8 Oct 2000, Dieter Maurer wrote:

 Aaron Straup Cope writes:
   My problem is that I can't seem to figure out, specifically, which
   permissions to give a user that will allow them to read ZopeTime().
 Strange...
 
 "DateTime.DateTime" objects (and therefore "ZopeTime") are
 explicitely unprotected (and can be used by everyone).
 
 I tried your example as "Anonymous" (Zope 2.2.2) and
 it worked as expected (i.e. no NameError).
 
 
 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] Newbie question : ZopeTime permissions

2000-10-10 Thread Dieter Maurer

Aaron Straup Cope writes:
  I did not want to allow the Anonymous role *any* permissions, and the
  site I am working in is contained in a folder beneath the root Zope
  folder. 
  
  The problem was that I had disabled the "Access contents
  information" privilege for the Anonymous user (whose permissions I forgot
  are inherited by all other users) at the root level, thus preventing Joe
  User from being able to access internals(?) like
  ZopeTime even if [it] had permissions at a sub-directory level.
Sorry, I was wrong, at least partially!

The fact, that "ZopeTime" returns an unprotected DateTime object,
does of cause not mean that "ZopeTime" itself is unprotected.

After your message, I reexamined your problem:

 * "ZopeTime" is defined in "OFS.Application.Application",
   i.e. the top level application object.

 * "ZopeTime" apparently is not protected by an explicit
   permission (neither mentioned in an "__ac_permissions__"
   nor is there a "ZopeTime__roles__" attribute nor
   is there a new SecurityManager assertion about
   "ZopeTime".

   As I understand Zope 2.2 security, this should mean
   "ZopeTime" is inaccessible from DTML.
   
 * However, magically, "ZopeTime" is protected by "Access Contents
   Information". 

I can not tell you why.
Both is astonishable:
  * that it is accessible by DTML at all
  * why "Access Contents Information" is required.

Apparently, the Zope security still has some hidden magic.


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] Newbie question : ZopeTime permissions

2000-10-08 Thread Dieter Maurer

Aaron Straup Cope writes:
  My problem is that I can't seem to figure out, specifically, which
  permissions to give a user that will allow them to read ZopeTime().
Strange...

"DateTime.DateTime" objects (and therefore "ZopeTime") are
explicitely unprotected (and can be used by everyone).

I tried your example as "Anonymous" (Zope 2.2.2) and
it worked as expected (i.e. no NameError).


Dieter

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




[Zope] Newbie question : ZopeTime permissions

2000-10-06 Thread Aaron Straup Cope

Hi,

My name is Aaron.

I am trying to set up zope with (atleast) three roles : manager, admin,
user.

I'd like to give the last two the bare minimum Security permissions
possible and adding them as needed later on. 

My problem is that I can't seem to figure out, specifically, which
permissions to give a user that will allow them to read ZopeTime().

(see below)

For the admin user, I have set the Access content information and View *
options globally. I've tried guessing at some others, but there are alot
of possible combinations to try so I thought maybe I would just ask.

Related, is there a detailed description of the default Security
settings? I've checked the mailing lists and the Zope docs and if it's
there, I guess I missed it.

Thanks,

dtml-call "REQUEST.set('ts', ZopeTime())"
dtml-call "REQUEST.set('foo',_.str(_.int(ts)))"

dtml-var foo

Traceback (innermost last):
  File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: test)
  File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: test)
  File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line 177, in
__call__
(Object: test)
  File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py, line
528, in __call__
(Object: test)
  File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: REQUEST.set('ts', ZopeTime()))
(Info: REQUEST)
  File string, line 0, in ?
NameError: (see above)


___
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] Newbie question : ZopeTime permissions

2000-10-06 Thread knight

Aaron, you left out the error. What was it...

On Fri, 6 Oct 2000, Aaron Straup Cope wrote:

 Hi,
 
 My name is Aaron.
 
 I am trying to set up zope with (atleast) three roles : manager, admin,
 user.
 
 I'd like to give the last two the bare minimum Security permissions
 possible and adding them as needed later on. 
 
 My problem is that I can't seem to figure out, specifically, which
 permissions to give a user that will allow them to read ZopeTime().
 
 (see below)
 
 For the admin user, I have set the Access content information and View *
 options globally. I've tried guessing at some others, but there are alot
 of possible combinations to try so I thought maybe I would just ask.
 
 Related, is there a detailed description of the default Security
 settings? I've checked the mailing lists and the Zope docs and if it's
 there, I guess I missed it.
 
 Thanks,
 
 dtml-call "REQUEST.set('ts', ZopeTime())"
 dtml-call "REQUEST.set('foo',_.str(_.int(ts)))"
 
 dtml-var foo
 
 Traceback (innermost last):
   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module
   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 187, in
 publish
   File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221, in
 zpublisher_exception_hook
 (Object: Traversable)
   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 171, in
 publish
   File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line 160, in
 mapply
 (Object: test)
   File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 112, in
 call_object
 (Object: test)
   File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line 177, in
 __call__
 (Object: test)
   File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py, line
 528, in __call__
 (Object: test)
   File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py, line
 337, in eval
 (Object: REQUEST.set('ts', ZopeTime()))
 (Info: REQUEST)
   File string, line 0, in ?
 NameError: (see above)
 
 
 ___
 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] Newbie question : ZopeTime permissions

2000-10-06 Thread Aaron Straup Cope

Doh! Sorry.

Error Type: KeyError
Error Value: ZopeTime

On Fri, 6 Oct 2000, knight wrote:

 Aaron, you left out the error. What was it...
 
 On Fri, 6 Oct 2000, Aaron Straup Cope wrote:
 
  Hi,
  
  My name is Aaron.
  
  I am trying to set up zope with (atleast) three roles : manager, admin,
  user.
  
  I'd like to give the last two the bare minimum Security permissions
  possible and adding them as needed later on. 
  
  My problem is that I can't seem to figure out, specifically, which
  permissions to give a user that will allow them to read ZopeTime().
  
  (see below)
  
  For the admin user, I have set the Access content information and View *
  options globally. I've tried guessing at some others, but there are alot
  of possible combinations to try so I thought maybe I would just ask.
  
  Related, is there a detailed description of the default Security
  settings? I've checked the mailing lists and the Zope docs and if it's
  there, I guess I missed it.
  
  Thanks,
  
  dtml-call "REQUEST.set('ts', ZopeTime())"
  dtml-call "REQUEST.set('foo',_.str(_.int(ts)))"
  
  dtml-var foo
  
  Traceback (innermost last):
File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 222, in
  publish_module
File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 187, in
  publish
File /usr/local/zope.old/lib/python/Zope/__init__.py, line 221, in
  zpublisher_exception_hook
  (Object: Traversable)
File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 171, in
  publish
File /usr/local/zope.old/lib/python/ZPublisher/mapply.py, line 160, in
  mapply
  (Object: test)
File /usr/local/zope.old/lib/python/ZPublisher/Publish.py, line 112, in
  call_object
  (Object: test)
File /usr/local/zope.old/lib/python/OFS/DTMLDocument.py, line 177, in
  __call__
  (Object: test)
File /usr/local/zope.old/lib/python/DocumentTemplate/DT_String.py, line
  528, in __call__
  (Object: test)
File /usr/local/zope.old/lib/python/DocumentTemplate/DT_Util.py, line
  337, in eval
  (Object: REQUEST.set('ts', ZopeTime()))
  (Info: REQUEST)
File string, line 0, in ?
  NameError: (see above)
  
  
  ___
  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] Newbie-question on ZCatalog

2000-09-26 Thread Marc Breitenreicher

Hi,

I'm trying to build a Catalog with a report table just as the one on
http://classic.zope.org:8080/Collector/tableBrowse?cfDescAndTitle=catalog

That's a table with document-title, date and the first 30 words of the
document-content.

My problem: how can I insert the content into the ZSearch report-file?
Is there a simple way just like finding out the document-url 
( here it is dtml-var "catalog.getpath(data_record_id_)" )?

Thanks for your help

Marc

___
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] Newbie Question: File upload in from my own Product

2000-09-20 Thread Dicken, Peer

Hi,

I´m new to Zope ;) I´m currently composing a set of products for my website
and have a little problem now:
I need to make a Product that makes it possible to upload a file, well,
basically a tuned "FILE" object.
I need to add a description. Is it right to add the FILE object in my
ZClass, or what should I do?

 
 
MfG / best regards, 
 
Peer Dicken
 
IMD GmbH 
Softwareentwicklung  Unternehmensberatung
Edisonstr. 1
59199 Bönen
 
Tel.: +49 23 83 - 9191-0
Fax.: +49 23 83 - 919191

___
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] Newbie Question: File upload in from my own Product

2000-09-20 Thread Dieter Maurer

Dicken, Peer writes:
  I´m new to Zope ;) I´m currently composing a set of products for my website
  and have a little problem now:
  I need to make a Product that makes it possible to upload a file, well,
  basically a tuned "FILE" object.
  I need to add a description. Is it right to add the FILE object in my
  ZClass, or what should I do?
That is one option.

However, images have properties of their own.
You can just define a new property "description" and give it
a value.

Look at the "PropertyManager" interface (- object reference
(- zdp.zope.org) or interface Wiki (- dev.zope.org)
or the source.



Dieter

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




[Zope] XML and Zope newbie question...

2000-09-08 Thread Eric L. Walstad

Hi All,

I am just getting started in XML and am trying to figure out how it works
with Zope.  I would like to be able to post some data to Zope in XML format
and have Zope parse the data into Zope objects.  Is this possible?  It seems
like I should be able to create the Zclasses and, when Zope receives the
post, have Zope automagically create the necessary objects from my classes.

Any input on how to do this or pointers to a better way would be fantastic.

Please respond to me directly as I am not currently able to handle the list
volume.

Thanks,

Eric.


___
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] XML and Zope newbie question...

2000-09-08 Thread Phil Harris

Eric,

Take a look at the XMLDocument product, available from Zope.org.

It already parses the xml into zope objects (they may not be exactly what
you want though), but it may give you a start into what you want.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Eric L. Walstad" [EMAIL PROTECTED]
To: "Zope@Zope. Org" [EMAIL PROTECTED]
Sent: Thursday, September 07, 2000 7:53 PM
Subject: [Zope] XML and Zope newbie question...


 Hi All,

 I am just getting started in XML and am trying to figure out how it works
 with Zope.  I would like to be able to post some data to Zope in XML
format
 and have Zope parse the data into Zope objects.  Is this possible?  It
seems
 like I should be able to create the Zclasses and, when Zope receives the
 post, have Zope automagically create the necessary objects from my
classes.

 Any input on how to do this or pointers to a better way would be
fantastic.

 Please respond to me directly as I am not currently able to handle the
list
 volume.

 Thanks,

 Eric.


 ___
 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] Newbie question: Unhandled requests.

2000-09-07 Thread Hannes


We currently started to run our site using Zope behind Apache using
ProxyPass,
when testing from the outside it
seems that there many (about one-third)  of the  requests that are not
handled by
Zope, the browser seems to recieve nothing,
(means the browser times out),
this behaviour does not depend on the complexity of the document
templates,
it is an overall phenomenon (including management screens etc...).
When pressing reload the things get okay most of the times, but it is
annoying..

Any help would be appreciated.
thanks in advance.

H.Grund.

please replay to
[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] newbie question: installing ZSiteMap and ZPhotoAlbum

2000-09-04 Thread Bill Anderson

Tamara Temple wrote:
 
 Hi all,
 
 My first posting here, please forgive if this is obvious, cause it
 isn't to me. I already checked the How-To's and searched the zope-list
 archives and came up with nothing.
 
 I downloaded the two zexp files for ZSiteMap and ZPhotoAlbum, and put
 them in the import directory. When I try to import them, I get an
 error and a traceback saying that "this operation isn't support by
 ZSiteMap" (or ZPhotoAlbum, depending). There are no instructions with
 either one on how to install them. What do I need to do in order for
 these to work?

You have to import products into the Control Panel - Products folder.


--
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] Newbie question: FORM processing in Zope.

2000-08-28 Thread Amit Redij


hi,

I am a Perl/CGI programmer, trying out Zope.
I am confused right now about
 HOW TO process FORM variables?
and most important thing is
how to validate form inputs.(like same thing is best done in PERL using
regex)

that is, if I have a html having some form variables and a submit
button. I click on the submit button. it should call some script..right?
My question is how to pass values from one script to another. how is
this done in Zope?

thanks a lot in advance.

regards
Amit
 

 .--.
|o_o |
|\_/ |
   //   \ \Amit Redij
  (| | )   mailto:[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] Newbie question: FORM processing in Zope.

2000-08-28 Thread J. Atwood

Easy and hard answer.

The easy answer is forget what you know about scripts/cgi and pulling in
form variables from some sort of CGI method (perl module). Since Zope is a
constant running process it does not require that you point to a script.

Hard Answer: The basics are that all you have to do is give the form element
a name (as you would in any form) and point the action of the form to
another DTML Method/Document. In that M/D all you have to do to get the
variable is call it with DTML-VAR variable_name

1) Create a form page with 'submit' with one text input box with a name of
'email_address'.

2) Point the action to a method called 'result' and create that

3) In the 'result' method include this code dtml-var email_address

4) Play around.

When you submit from one you should be taken to the second page and the
email_address should be there.

Now, for validation you can do all sorts of tricky things. I happen to like
to have the form point back to itself and have one method handle the entire
activity. You can validate things by asking for them, or trying to do
something else like put them into a database/email. If they are not there
you will get an error so you can use dtml-try. What makes Zope great is
that I can have the form and function in the same page (easier to
update/check).

Examples: (these are live and in production so please be kind)

http://fundraising.gotschool.com/tell_a_friend.html

http://market.gotschool.com/  (click on register for either school or
supplier and notice how the form is different for both).

Same thing done twice.

J

 From: Amit Redij [EMAIL PROTECTED]
 Date: Mon, 28 Aug 2000 17:15:03 +0530
 To: [EMAIL PROTECTED]
 Subject: [Zope] Newbie question: FORM processing in Zope.
 
 
 hi,
 
 I am a Perl/CGI programmer, trying out Zope.
 I am confused right now about
 HOW TO process FORM variables?
 and most important thing is
 how to validate form inputs.(like same thing is best done in PERL using
 regex)
 
 that is, if I have a html having some form variables and a submit
 button. I click on the submit button. it should call some script..right?
 My question is how to pass values from one script to another. how is
 this done in Zope?
 
 thanks a lot in advance.
 
 regards
 Amit
 
 
 .--.
 |o_o |
 |\_/ |
 //   \ \Amit Redij
 (| | )   mailto:[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 )




Re: [Zope] Newbie question: FORM processing in Zope.

2000-08-28 Thread Loren Stafford



A great resource for newbies is the collection of How-To's
http://www.zope.org/Documentation/How-To (or better yet:
http://www.zope.org/Members/AlexR/tips/howto_list where you can use browser
search to find what you need).

Search for "forms" and you will see, for example:

http://www.zope.org/Members/jules/smarterforms_html

In short, the methods of Zope objects are all "CGI scripts". For the
"action" of a form, you supply the url of a form-handling method of some
Zope object you have created. When that method runs, form fields are stored
in the dictionary (hash, to you) that implements the namespace for the
request. You access them as simple DTML variables: e.g.

dtml-var form_field_name

If you want to send the value of that form field on to another form, you do
it much the same as in Perl -- you code a hidden form field and assign it
the value dtml-var form_field_name.

-- Hope that helps
-- Loren

- Original Message -
From: "Amit Redij" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: August 28, 2000 04:45 AM
Subject: [Zope] Newbie question: FORM processing in Zope.



 hi,

 I am a Perl/CGI programmer, trying out Zope.
 I am confused right now about
  HOW TO process FORM variables?
 and most important thing is
 how to validate form inputs.(like same thing is best done in PERL using
 regex)

 that is, if I have a html having some form variables and a submit
 button. I click on the submit button. it should call some script..right?
 My question is how to pass values from one script to another. how is
 this done in Zope?

 thanks a lot in advance.

 regards
 Amit

 
  .--.
 |o_o |
 |\_/ |
//   \ \Amit Redij
   (| | )   mailto:[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 )




RE: [Zope] Newbie Question (Content Manager Tutorial)

2000-08-21 Thread Steve Drees

 With the advent of Zope 2.2, the first thing you need to do is to create a
 management user.  You cannot use the 'superuser' to manage content.  I
 know this is a little unfamiliar, but, for now, just suspend disbelief and
 create another user with the 'Manager' role (by visiting the acl_users
 User Folder and adding a user).  Then quit the browser, and log in as the
 user you created.  You'll then be able to follow the cmg.


Couldn't the zope install be modified to prompt for a 'Manager' username and
password
and then create that account from the outset?


___
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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Mark A. Pappas

Hi All,
I decided today was learn Zope Day. I expect to be pounding the list with
some newbie questions.

I installed Zope 2.2.0 on a Win 98 machine. Seems to work fine. I dloaded
the Content Manager Guide and started working through the tutorial. Went to
create a folder as instructed.

Id: News
Title: The ZAcme News


X  Create public interface
X  Create user folder

Below is what I got. What am I doing wrong?
Thanks All
Mark Pappas


Zope Error
Zope has encountered an error while publishing this resource.

Error Type: SuperCannotOwn
Error Value: Objects cannot be owned by the superuser






Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML
source for this page.

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




Traceback (innermost last):
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 222,
in publish_module
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 187,
in publish
  File C:\Program Files\WebSite\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 171,
in publish
  File C:\Program Files\WebSite\lib\python\ZPublisher\mapply.py, line 160,
in mapply
(Object: manage_addFolder)
  File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 112,
in call_object
(Object: manage_addFolder)
  File C:\Program Files\WebSite\lib\python\OFS\Folder.py, line 116, in
manage_addFolder
  File C:\Program Files\WebSite\lib\python\OFS\ObjectManager.py, line 249,
in _setObject
(Object: ApplicationDefaultPermissions)
  File C:\Program Files\WebSite\lib\python\AccessControl\Owned.py, line 271,
in manage_fixupOwnershipAfterAdd
(Object: ElementWithAttributes)
SuperCannotOwn: (see above)



___
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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Chris McDonough

Darn.  Those docs are a little ( ok, a lot...) out of date.  They're
still useful, but they don't cover a few things.

With the advent of Zope 2.2, the first thing you need to do is to create a
management user.  You cannot use the 'superuser' to manage content.  I
know this is a little unfamiliar, but, for now, just suspend disbelief and
create another user with the 'Manager' role (by visiting the acl_users
User Folder and adding a user).  Then quit the browser, and log in as the
user you created.  You'll then be able to follow the cmg.

On Sat, 19 Aug 2000, Mark A. Pappas wrote:

 Hi All,
 I decided today was learn Zope Day. I expect to be pounding the list with
 some newbie questions.
 
 I installed Zope 2.2.0 on a Win 98 machine. Seems to work fine. I dloaded
 the Content Manager Guide and started working through the tutorial. Went to
 create a folder as instructed.
 
 Id: News
 Title: The ZAcme News
 
 
 X  Create public interface
 X  Create user folder
 
 Below is what I got. What am I doing wrong?
 Thanks All
 Mark Pappas
 
 
 Zope Error
 Zope has encountered an error while publishing this resource.
 
 Error Type: SuperCannotOwn
 Error Value: Objects cannot be owned by the superuser
 
 
 
 
 
 
 Troubleshooting Suggestions
 
 The URL may be incorrect.
 The parameters passed to this resource may be incorrect.
 A resource that this resource relies on may be encountering an error.
 For more detailed information about the error, please refer to the HTML
 source for this page.
 
 If the error persists please contact the site maintainer. Thank you for your
 patience.
 
 
 
 
 Traceback (innermost last):
   File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 222,
 in publish_module
   File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 187,
 in publish
   File C:\Program Files\WebSite\lib\python\Zope\__init__.py, line 221, in
 zpublisher_exception_hook
   File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 171,
 in publish
   File C:\Program Files\WebSite\lib\python\ZPublisher\mapply.py, line 160,
 in mapply
 (Object: manage_addFolder)
   File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 112,
 in call_object
 (Object: manage_addFolder)
   File C:\Program Files\WebSite\lib\python\OFS\Folder.py, line 116, in
 manage_addFolder
   File C:\Program Files\WebSite\lib\python\OFS\ObjectManager.py, line 249,
 in _setObject
 (Object: ApplicationDefaultPermissions)
   File C:\Program Files\WebSite\lib\python\AccessControl\Owned.py, line 271,
 in manage_fixupOwnershipAfterAdd
 (Object: ElementWithAttributes)
 SuperCannotOwn: (see above)
 
 
 
 ___
 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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Chris Withers

Chris McDonough wrote:
 With the advent of Zope 2.2, the first thing you need to do is to create a
 management user.  You cannot use the 'superuser' to manage content. 

Can anyone remind me why?

T0he problems it's caused, particularly with broswers caching basic auth
info, seem to be pretty nasty for newbies (and a few oldbies ;-)

cheers,

Chris

___
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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Jan H. Haul

"Mark A. Pappas" wrote:

 I installed Zope 2.2.0 on a Win 98 machine. Seems to work fine. I dloaded
 the Content Manager Guide and started working through the tutorial. Went to
 create a folder as instructed.
 
 Below is what I got. What am I doing wrong?

 Error Type: SuperCannotOwn
 Error Value: Objects cannot be owned by the superuser
 

You are working as superuser.
While this *did* work up to Zope 2.1.6, since Zope 2.2 the
security model was tightened.

You must (as superuser) create a user with manage privilege,
restart your browser and use that user to create objects.

HTH,
Jan

___
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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Chris McDonough

See (sneak peek) http://www.zope.org/Members/mcdonc/PDG/6-1-Security.stx,
section named "The Superuser".

I hope to have this chapter really finished this weekend.

On Sat, 19 Aug 2000, Chris Withers wrote:

 Chris McDonough wrote:
  With the advent of Zope 2.2, the first thing you need to do is to create a
  management user.  You cannot use the 'superuser' to manage content. 
 
 Can anyone remind me why?
 
 T0he problems it's caused, particularly with broswers caching basic auth
 info, seem to be pretty nasty for newbies (and a few oldbies ;-)
 
 cheers,
 
 Chris
 
 ___
 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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Dieter Maurer

Hi Mark,

Mark A. Pappas writes:
  I installed Zope 2.2.0 
  I dloaded the Content Manager Guide 
  ...
  Zope Error
  Zope has encountered an error while publishing this resource.
  
  Error Type: SuperCannotOwn
  Error Value: Objects cannot be owned by the superuser
The Content Manager Guide still describes the world
before Zope 2.2.

For some reason (that I do not understand), DC descided
that, starting with Zope 2.2.0, the SuperUser is no
longer Super but instead rather limited. He cannot own objects
and therefore, he cannot create objects.

What you need to do:

  As SuperUser go to "acl_users".
  Create a new user with a role of "Manager".
  Close your browser (all windows!).
  Recontact Zope (in a fresh browser!) as your newly created
  Manager.
  Use this manager, whenever your guide speaks of "SuperUser".


Dieter

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




[Zope] NewBIE Question

2000-08-17 Thread CURTIS David

After re-installing zope on NT box, I noticed that I am now running two instances of 
the Zope service.  I was able to disable one instance but how can I permanatly remove 
the service and how do I know which Zope service is running?

   
   
   
   
   
  

___
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] newbie question -- can't delete toplevel folder

2000-08-10 Thread Guy Middleton

I just installed Zope, and tried playing with it a bit.

I can create a toplevel folder (in the "Zope" directory), but it then seems
to be undeletable.  Is this a problem, or is there something special about
toplevel folders that I don't know?

I can delete any contents I put in the folder with
no problem, but not the folder itself.

___
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] Newbie question: referring to dtml-call documents

2000-08-07 Thread Dieter Maurer

David Loeffler writes:
  
  whenever I try to get hold of this with anything like dtml-var 
  "_[objId].getProperty(dest)" (objId is the id of the document) it simply 
  redirects ...


"_[xxx]" executes (calls) the retrieved object, if possible.
In your case, execution calls "RESPONSE.redirect".

You need "_.getitem(xxx)" instead of "_[xxx]".
This only retrieves and does not call the object.


Dieter

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




[Zope] newbie question: user login

2000-07-31 Thread Peter Schneider-Kamp

I hope this is the right place to ask. Sorry, if it is not.

I can login into zope as superuser without any problems,
but I cannot login as the user "me" I created (with
password "meme"). I have given owner and manager rights
to "me". What else do I have to do?

Python raises an "Unauthorized" exception. Here's the traceback:

Traceback (innermost last):
File C:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 222, in 
publish_module
File C:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish
File C:\Programme\WebSite\lib\python\ZPublisher\Publish.py, line 162, in publish
File C:\Programme\WebSite\lib\python\ZPublisher\BaseRequest.py, line 443, in 
traverse
File C:\Programme\WebSite\lib\python\ZPublisher\HTTPResponse.py, line 563, in 
unauthorized
Unauthorized: (see above)

help-appreciated,
Peter
--
Peter Schneider-Kamp  ++47-7388-7331
Herman Krags veg 51-11mailto:[EMAIL PROTECTED]
N-7050 Trondheim  http://schneider-kamp.de

___
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] newbie question: how do I adjust field width?

2000-07-31 Thread Joe Hewitt

Hi,

I'm making an input form.  When I try to change the form's input field
width, it automagically displays 30 char for each field.  Is there any way
to adjust the width?

Different question: where can I find some good examples of how to validate
input?

Thanks.


-- 
Joe Hewitt  email: [EMAIL PROTECTED]
Linux Coordinator
Washburn University Law School


___
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] newbie question: how do I adjust field width?

2000-07-31 Thread Bill Anderson

Joe Hewitt wrote:
 
 Hi,
 
 I'm making an input form.  When I try to change the form's input field
 width, it automagically displays 30 char for each field.  Is there any way
 to adjust the width?

Basic HTML Question. Please read HTML docs.

 
 Different question: where can I find some good examples of how to validate
 input?

Depends on how you want to do it, ie. server or client side. Consult the mailing list
archives for many references and examples. 
They can be reached from zope.org - Resources - Mailing Lists

Cheers,

Bill


--
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] Newbie question on page counters

2000-07-27 Thread Chris Withers

"Richard P. Muller" wrote:
 I'm in the process of learning Zope hacking, and I'm having a really
 hard time getting a page counter to work. It isn't even that page
 counters are all that important to me, it's that I feel that if I can't
 even do something this simple, what hope do I have doing something
 really hard?

The ZODB is a _really_ bad place to store a page counter, especially on
a busy site.
Data.fs will grow each time your counter increments. This is because
it's a transactional daatbase with undo ability...

 Here's what I've done.
 (1) Under "Properties" I've created two properties (both ints)
 counter_starting_value, which I've set to 11 (arbitrarily)
 counter_value, which I've set to 0

Sounds good :-)

 dtml-if counter_value
 dtml-let counter_value = counter_value + 1
 /dtml-let
 dtml-else
 dtml-let counter_value = counter_starting_value
 /dtml-if
 dtml-var counter_value
 
 This didn't work. The error message reported that the syntax in the
 first (and probably the second, but I never got past the first) dtml-let
 command was wrong.

Whoops, just remember this:
DTML is not a programming language, it is designed for data presentation
and form processing. Or something like that ;-)

To do what you want, you probably want something like:

dtml-call
"manage_changeProperties(counter_value=getProperty(counter_value,counter_starting_value-1)+1)"

Which isn't pretty :S

cheers,

Chris

___
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] Newbie question on page counters

2000-07-27 Thread Chris Withers

Chris Withers wrote:
 To do what you want, you probably want something like:
 
 dtml-call
 
"manage_changeProperties(counter_value=getProperty(counter_value,counter_starting_value-1)+1)"

Erk, maybe this:
 dtml-call

"manage_changeProperties(counter_value=getProperty('counter_value',getProperty(counter_starting_value,0)-1)+1)"

Chris

___
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] Newbie question about permissions in zclass

2000-07-19 Thread Nathalie Bernier

Hello everybody !

I'd like to have some explanations about the "define permisions" view and
the permission mappings in zclass. Maybe something exists in the zope
documentation, but I haven't found anything. Thank you for helping.


Nathalie Bernier
*
Développeur web 03.82.24.00.41

multiThématiques
Centre Jean Monnet
Longlaville
54400 LONGWY

http://multithematiques.com
Chaînes thématiques sur câble et satellite
*


___
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] Newbie question: User Folder

2000-07-17 Thread Firestar

I'm going through the Zope Content Manager's Guide(on zope.org) and i came
across this 'User Folder' section that i have a few questions on.

e.g. Let's say we have 4 folders:
ZACme/Marketing/Sales/FrontDesk

Sally is defined as manager in 'Marketing'. I understand that her role is
'acquired' in Sales and FrontDesk, but not in ZAcme, therefore she would be
able to make changes in Sales and FrontDesk folders. My question is, can we
'turn off' this acquired role and do not allow Sally to access Sales(but
allow her to access FrontDesk, and Marketing of course)? Or must we assign a
different role to her?

TIA  regards,
firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


___
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] NewBie question for sqlsession

2000-07-09 Thread Hong Wai Leong

Hello,

I just installed sqlsession 0.2.9 in my NT with zope version 2.1.6, and I 
had created the table in Gadfly according to the given sql schema.

When I try to load the Session into my page, it just work for the first 
time, after that I got an error like this :

Zope Error

Zope has encountered an error while publishing this resource.
KeyError
Sorry, a Zope error occurred.

and when I view the source, I got this :

!--
Traceback (innermost last):
  File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 214, in 
publish_module
  File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 179, in publish
  File E:\MYBOOK~2\lib\python\Zope\__init__.py, line 202, in 
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 165, in publish
  File E:\MYBOOK~2\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: index_html)
  File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 102, in 
call_object
(Object: index_html)
  File E:\MYBOOK~2\lib\python\OFS\DTMLDocument.py, line 166, in __call__
(Object: index_html)
  File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in 
__call__
(Object: index_html)
  File E:\MYBOOK~2\lib\python\OFS\DTMLMethod.py, line 146, in __call__
(Object: standard_html_header)
  File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in 
__call__
(Object: standard_html_header)
  File E:\MYBOOK~2\lib\python\Products\SQLSession\SQLSession.py, line 294, 
in __call__
(Object: Session)
  File E:\MYBOOK~2\lib\python\Shared\DC\ZRDB\DA.py, line 424, in __call__
(Object: sqlSessionLookup)
  File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in 
__call__
(Object: string)
  File E:\MYBOOK~2\lib\python\Shared\DC\ZRDB\sqltest.py, line 179, in render
(Object: zsession)
KeyError: zsession

--

Is this cause by the wrong database field name or what ??

Leong


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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

2000-06-30 Thread Jerry Jewell

Has anyone gotten Zope running on either LinuxPPC or OSX? If so, can you
share your wisdom on how it was done?

We'll also be looking for experienced Zope web site developers so send
me your resume if interested.

Thanks

Jerry Jewell
WebDudes, Inc.
916 624 0601


___
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] Newbie question on Zope and WorldPilot

2000-06-29 Thread Angel Rivera

Hey Zope Meisters

I am a newbie who is trying hard to get WorldPilot to
run. i think i got most of it to work until it comes to add
a WorldPilot Product Instance and no matter what I have
tried it will not work.  Can someone direct me to a doc
or give me help?  TIA, -ar

Zope is: Zope-2.1.6-solaris-2.6-sparc
WorldPilot is 1.0.4



___
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] [Newbie Question] Pertaining to Search Engines

2000-06-28 Thread Eddie Mosier

Is it possible for you to get a site that is built with zope to be found by 
search engines (other than those that are directory listings, like 
yahoo.com and dmoz.com)?  From what I have seen, I think zope would do what 
I would like, but I need to know this.   From what I have learned so far I 
doesn't really seen possible.

Eddie Mosier


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

2000-06-22 Thread ethan mindlace fremen

Alexander N Gould wrote:
 
 Now that I've set up some virtual hosts off my zserver, I have another
 question.  These sites (each in a folder in the zope DB) share a lot of
 data in the form of some custom zobjects representing contacts, calendar
 items, and posts to discussion boards.  If I put these objects in folders
 on the root level, how do I access them from dtml methods somewhere else?
 Or am I going about this all wrong?

dtml-with SomeTopFolder
dtml-var SomeObject
/dtml-with

A revamped "transparent folder" will allow you to make global objects
more easily sometime in the near future (after 2.2 release)

ethan mindlace fremen
Zopatista Community Liason

___
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] Newbie Question (dropdown menu)

2000-06-21 Thread joel grimes

I'm trying to fill a combo-box (pardon the vb-centric lingo - I don't know 
what the things are called - it's a select...option... thing) with items 
selected from a table.  I haven't a clue how to do this.  I've got the ODBC 
Connection and SQL Method working, but how do I iterate through the query 
results to fill a drop-down?

Thanks

Joel Grimes

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
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] Newbie Question (dropdown menu)

2000-06-21 Thread Jim Sanford

This is my answer to another seeker's question.
It should also answer yours.

This code assumes that the variable customerid on the form
contains a value that matches up with customerid in 
the query custcompanysearch

___
dtml-let tcustid="customerid"
  select name="customerid"
dtml-in custcompanysearch
  option value=dtml-var customerid
  dtml-if "customerid==tcustid"selected/dtml-if
  dtml-var firstname dtml-var lastname/option
/dtml-in
  /select
dtml-let
 __
 
  Jim Sanford
  .   Database Engineer
 / \  /   Accelerated Technology, Inc.
/   / 720 Oak Circle Drive East
   /  /  \Mobile, AL 36609
  / / \   Voice: 334-661-5770  fax: 334-661-5788
 / \  E-Mail: [EMAIL PROTECTED]
  Web: http://www.atinucleus.com
  
 Nucleus.  All You NEED in an RTOS.  Royalty Free
 __


- Original Message - 
From: joel grimes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 21, 2000 10:51 AM
Subject: [Zope] Newbie Question (dropdown menu)


I'm trying to fill a combo-box (pardon the vb-centric lingo - I don't know 
what the things are called - it's a select...option... thing) with items 
selected from a table.  I haven't a clue how to do this.  I've got the ODBC 
Connection and SQL Method working, but how do I iterate through the query 
results to fill a drop-down?

Thanks

Joel Grimes

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
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] Newbie Question,

2000-06-07 Thread CURTIS David

Newbie Question,

I wish to use use the date of a database file in my dynamic html code.  For example, 
this database was last updated on 06/06/2000.  I suppose that there must be a dynamic 
html tag that zope uses.  What could it be?  I looked at all the documentation and 
have yet to discover it.  DTML-ZOPE-FILE-DATE  Any help is apprechiated. 

   
   
   
   
   
   
 

___
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] Newbie Question,

2000-06-07 Thread Chris Withers

CURTIS David wrote:
 I wish to use use the date of a database file in my dynamic html code.  For example, 
this database was last updated on 06/06/2000.  I suppose that there must be a dynamic 
html tag that zope uses.  What could it be?  I looked at all the documentation and 
have yet to discover it.  DTML-ZOPE-FILE-DATE  Any help is apprechiated.

dtml-var bobobase_modification_time

...obviously... :(

This will give you the time your current object was last modified.

Why has this not been renamed to something sensible?
We lost PrincipiaSearchSource a while back, I hope this goes the same
way ;-)

cheers,

Chris

___
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] Newbie question: graphics in subdirs

2000-06-07 Thread Randy Edwards

I'm going to rewrite my web site in dtml and am using the latest stable
Zope.  Well, I should say I'll rewrite it after I get over this infuriating
newbie problem I have. :-)
`
I'm trying to get Zope to display an image from a subdir.  I've whipped up a
simple dtml document called "test".  Test contains this:

dtml-var standard_html_header
h2dtml-var title_or_id/h2
pThis is the dtml-var id Document./p
pNow show a graphic: br
dtml-var logo.jpg
/p
dtml-var standard_html_footer

   That references an image file in the root directory called logo.jpg. 
Everything works, it displays fine.

   However, I want to keep all of my commonly used image files in a
subdirectory called /images.  So I create a folder called "images", upload
another copy of logo.jpg into it, everything's fine.  I change the dtml in
the "test" document to be "dtml-var /images/logo.jpg".  And it doesn't
work, giving me an error message of:

Error Type: KeyError
Error Value: /images/logo.jpg

   Looking through the docs and tutorials I can't find anything on this --
and I know it's mindlessly simple.  Can someone whack me with a clue-bat? 
TIA.

-- 
 Regards,| Debian GNU/ __  o  http://www.debian.org
 .   |/ / _  _  _  _  _ __  __
 Randy   |   / /__  / / / \// //_// \ \/ /
 ([EMAIL PROTECTED]) |  // /_/ /_/\/ /___/  /_/\_\
 http://www.golgotha.net | because lockups should only be for convicts.

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




  1   2   >