[Zope] How do you use acquisition when instantiating an object via a REQUEST.set

2000-06-30 Thread Corey Zimmet

I am a relatively new Zope user and I have a simple python Class in a python
product such as:

class Item(Acquisition.Implicit):
  # Just a simple item class

  def __init__(self, id):
self.id=id

If I instantiate the object in DTML with somthing like this:

dtml-call "REQUEST.set('item',Item.Item('someid'))"

How can I make the object acquire the current context?  I do not want the
object to be added to any container other than the REQUEST.

Thanks,
Corey


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




[Zope] RE: [ Zope] ZCatalog dynamic sites

2000-07-21 Thread Corey Zimmet


Write a brains class that you would call to catalog and uncatalog
insert/update/delete ZSQLmethods:

For example:

class MyObject:
"""
Some arbitrary object - MyObjectID - the id of your object
MyCatalog -  the catalog you want to use to
index the sql
MyText1 -metadata column in your catalog
MyText2 -an additional metadata column in
your catalog
"""

def FullText(self):
"an index in your catalog"
return "%s %s" % (self.MyText1, self.MyText2)

def catalogObject(self):
"Catalog me"
self.MyCatalog.catalog_object(self, self.MyObjectID)

def uncatalogObject(self):
"Uncatalog me"
self.MyCatalog.uncatalog_object(self.MyObjectID)




Hope this helps,
Corey




___
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] 2.2 and ZLDAPConnection - editAttributes fails.

2000-07-31 Thread Corey Zimmet

Has anyone succeeded in getting ZLDAPConnections to work with Zope 2.2? 
When I try to perform an edit on an Entry object, the edit appears to
work. However, the transaction is never committed to the LDAP server.

Also,  when doing the examples from the Howto,  I have to explicitly
call the Entry object's get method rather than using the attribute
directly.  For example:

dtml-var uid will fail

dtml-var expr="get('uid')" is successful



Thanks,
Corey

___
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] ZopeLDAP 1.0b4 breaks the root directory security tab

2000-10-06 Thread Corey Zimmet

Since installing ZopeLDAP 1.0b4, I get the following error when trying to
access the security tab at the root directory:
Zope Error

   Zope has encountered an error while publishing this resource.

   Error Type: TypeError
   Error Value: string member test needs char left operand



   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 /usr/local/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
  File /usr/local/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 187,
in publish
  File /usr/local/Zope-2.2.2-src/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 171,
in publish
  File /usr/local/Zope-2.2.2-src/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: manage_access)
  File /usr/local/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 112,
in call_object
(Object: manage_access)
  File /usr/local/Zope-2.2.2-src/lib/python/AccessControl/Role.py, line 255,
in manage_access
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.2-src/lib/python/App/special_dtml.py, line 120,
in __call__
(Object: access)
(Info: /usr/local/Zope/lib/python/AccessControl/access.dtml)
  File /usr/local/Zope-2.2.2-src/lib/python/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: access)
  File /usr/local/Zope-2.2.2-src/lib/python/DocumentTemplate/DT_With.py,
line 146, in render
(Object: _.namespace(valid_roles=valid_roles()))
  File /usr/local/Zope-2.2.2-src/lib/python/DocumentTemplate/DT_In.py, line
630, in renderwob
(Object: permission_settings)
  File /usr/local/Zope-2.2.2-src/lib/python/AccessControl/Role.py, line 182,
in permission_settings
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.2-src/lib/python/AccessControl/Role.py, line 177,
in lambda
TypeError: (see above)


Removing the product returns the system back to normal.  Does anyone know
what I can patch to remove this?

Thanks,
Corey


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