[Zope3-Users] Principal annotations

2006-03-08 Thread Shane Hathaway
Chapter 27 of the Zope 3 book and the docstring for IPrincipal in Zope
3.2 both suggest Zope has the ability to provide a browser view of
principal annotations.  That would be a really great bit of
functionality to have!  Unfortunately, AFAICT, the system doesn't work
at all in Zope 3.2.  The Zope 3 book says you have to create an
Authentication Service, but no such thing exists anymore.

Instead, I created Pluggable Authentication Utility and put a principal
folder inside it.  But principals created this way are InternalPrincipal
objects which do not implement IPrincipal, so they don't have the extra
view I registered.  I could find no other way to visit a user object in
the management interface.  Therefore, views of IPrincipal are currently
never used.

Was this an accident?  Did it work at one time?  Are there plans to make
principal annotation views work again?  And how can I edit user
annotations in the meanwhile?

Shane

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Creating objects in software space when making site

2006-03-08 Thread Andreas Elvers

Joseph Method wrote:

This should definitely be a prominent How-To somewhere.


[...]

Oh yes... Some kind of How-To/Recipe page would be very helpful. I'm using
thunderbirds full-text search to find hidden recipes in zope3 user/dev
mailing lists.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Database access problem from form support Class

2006-03-08 Thread Cliff Ford
Zope-3.2.0: I have a MySQL database Utility installed that works fine 
via its Test tab, via an SQL Script, and with that script called from a 
page template. I want to to use a simple query from a class that 
supports a form in a context that has nothing to do with the database. 
The code I have tried looks like this:



from zope.app.rdb import queryForResults
from zope.app.rdb.interfaces import IZopeDatabaseAdapter

class EditRoles:
This class reads a form data and updates Permissions 

def getPrincipals(self):
try:
connection = zapi.getUtility(IZopeDatabaseAdapter, 'mysql')
except KeyError:
raise AttributeError(The database connection '%s' cannot be 
 found. % ('mysql'))
query = select * from z3users
result = queryForResults(connection, query)

And when I try to invoke the form I get this error

  File /usr/local/Zope320i/lib/python/cefsite/browser/editroles.py, 
line 47, in getPrincipals

result = queryForResults(connection, query)
  File 
/home/ceford/temp/Zope-3.2.0/build/lib.linux-i686-2.4/zope/app/rdb/__init__.py, 
line 401, in queryForResults

cursor = conn.cursor()
AttributeError: 'MySQLdbAdapter' object has no attribute 'cursor'

Can anyone suggest what I might be missing or suggest another way of 
accessing the database?


Cliff
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Creating objects in software space when making site

2006-03-08 Thread jürgen Kartnaller
Joseph Method wrote:
 This should definitely be a prominent How-To somewhere.
Definitely, but where is somewhere !

Maybe in the upcoming zope3.org website ?

Jürgen
-- 

---
Jürgen Kartnaller   mailto:juergen_at_kartnaller.at
http://www.kartnaller.at
http://www.mcb-bregenz.at
---

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] New way of using skins

2006-03-08 Thread Florian Lindner
Hello,

I have:

zope:interface
interface=.interfaces.ICentershockSkin
type=zope.publisher.interfaces.browser.IBrowserSkinType
name=centershock
/


class ICentershockSkin(zope.app.rotterdam.Rotterdam):


What do I have to give for the layer or type (what is the difference?) 
attributes of view / pages / ... directives?

layer = centershock does not seem to work anymore (for what is name attribute 
of the interface directive?).

layer=CS.skin.interfaces.ICentershockLayer seems to work but do I always 
have to give the lenghty python path??


Thanks,

florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] How to begin?

2006-03-08 Thread Karlo Lozovina
Hello to everyone on zope3-users!

I have a task of developing a web application bye the end of September,
thus giving me a roughly half a year window to learn Zope3 and develop
at least semi usable application.

I took the time and browsed most of the available Python web
frameworks, and narrowed it down to Zope3 and Django (possibly TG). I
mostly decided to go with Zope3 because it looks more like a complete
and homogeneous product, although still rather unfinished. Django sure
does look quite simpler with a less steep learning curve, but since I
have a time to spare, and I want to invest it in learning a good web
framework, Zope3 seems like a way to go. Those who think otherwise, say
so, it's still not late to go the other way :).

My first goal is to develop a simple encyclopedia-like web page, with a
page for adding content, one for searching inserted entries and a
hierarchical listing of inserted entries. Ofcourse, some basic user
authentication is needed, but nothing fancy. So, is there a
documentation/book/HOWTO anything targeted for us beginners that step
by step explains how to build a simple web site? Currently I'm stuck
with Zope3Book, but I can't quite make heads from tails :(.

So, what am I to do to get myself started towards developing my
application? Is there somewhere a nice introduction beginner-level text
that explains Zope3 fundamental concepts and some simple things you can
do with it?

I would hate myself if I had to give up on Zope3 just because a lack of
documentation :(.

Best regards, and thanks in advance.

-- 
Karlo Lozovina - Mosor

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to begin?

2006-03-08 Thread Joseph Method
I was just wondering whether I need to buy Philipp von Weitershausen's
book in addition to the Stephan Richter book I already have.  On
Amazon it looks like it has a more example-based approach.  Would
people recommend that someone buy both?

On 3/8/06, Max M [EMAIL PROTECTED] wrote:

 After that the Zope books are probably a good idea.

 --

 hilsen/regards Max M, Denmark

 http://www.mxm.dk/
 IT's Mad Science

 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users



--
-J. Method
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Database access problem from form support Class

2006-03-08 Thread Cliff Ford
To answer my own question for the record, the query call I had that 
looked like this:


result = queryForResults(connection, query)

should have looked like this:

result = queryForResults(connection(), query)

However, it would be helpful to know whether calling the database 
adapter utility directly has hidden implications - the thread safety 
field of IManageableZopeDatabaseAdapter returned 0 (Threads may not 
share the module) and I don't know what to do about it, if anything.


Cliff

Cliff Ford wrote:
Zope-3.2.0: I have a MySQL database Utility installed that works fine 
via its Test tab, via an SQL Script, and with that script called from a 
page template. I want to to use a simple query from a class that 
supports a form in a context that has nothing to do with the database. 
The code I have tried looks like this:



from zope.app.rdb import queryForResults
from zope.app.rdb.interfaces import IZopeDatabaseAdapter

class EditRoles:
This class reads a form data and updates Permissions 

def getPrincipals(self):
try:
connection = zapi.getUtility(IZopeDatabaseAdapter, 'mysql')
except KeyError:
raise AttributeError(The database connection '%s' cannot be 
 found. % ('mysql'))
query = select * from z3users
result = queryForResults(connection, query)

And when I try to invoke the form I get this error

  File /usr/local/Zope320i/lib/python/cefsite/browser/editroles.py, 
line 47, in getPrincipals

result = queryForResults(connection, query)
  File 
/home/ceford/temp/Zope-3.2.0/build/lib.linux-i686-2.4/zope/app/rdb/__init__.py, 
line 401, in queryForResults

cursor = conn.cursor()
AttributeError: 'MySQLdbAdapter' object has no attribute 'cursor'

Can anyone suggest what I might be missing or suggest another way of 
accessing the database?


Cliff
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Creating objects in software space when making site

2006-03-08 Thread Joseph Method
This is just work for you, but you could put up a list mapping recipe
description to thread. But then others could help distill and annotate
the recipes.

On the question of where to put it, I have a heretical suggestion:
plone.org. Plone developers are trying to understand Zope 3.

On 3/8/06, Andreas Elvers [EMAIL PROTECTED] wrote:
 Joseph Method wrote:
  This should definitely be a prominent How-To somewhere.
 
 [...]

 Oh yes... Some kind of How-To/Recipe page would be very helpful. I'm using
 thunderbirds full-text search to find hidden recipes in zope3 user/dev
 mailing lists.

 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users



--
-J. Method
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to begin?

2006-03-08 Thread Cliff Ford
In comparison to the cost of six months of your time the books are 
cheap! I refer to Phillip von Weiterhausen's book a lot, and when I 
don't understand something I see what Stephan Richter's book has to say. 
They are both good, even though a little behind the current Zope 3 
version. You will soon outgrow the very short on-line tutorials. I find 
that problems arise when I want to do something that isn't in the books 
and I have to use the Introspector, read the source code or search the 
mailing archives.  This week I spent an entire day trying to work out 
how to do something that turned out to be three lines of code, and 
another day on something that was effectively similar. Very satisfying 
when it all works though!


Cliff

Karlo Lozovina wrote:

Hello to everyone on zope3-users!

I have a task of developing a web application bye the end of September,
thus giving me a roughly half a year window to learn Zope3 and develop
at least semi usable application.

I took the time and browsed most of the available Python web
frameworks, and narrowed it down to Zope3 and Django (possibly TG). I
mostly decided to go with Zope3 because it looks more like a complete
and homogeneous product, although still rather unfinished. Django sure
does look quite simpler with a less steep learning curve, but since I
have a time to spare, and I want to invest it in learning a good web
framework, Zope3 seems like a way to go. Those who think otherwise, say
so, it's still not late to go the other way :).

My first goal is to develop a simple encyclopedia-like web page, with a
page for adding content, one for searching inserted entries and a
hierarchical listing of inserted entries. Ofcourse, some basic user
authentication is needed, but nothing fancy. So, is there a
documentation/book/HOWTO anything targeted for us beginners that step
by step explains how to build a simple web site? Currently I'm stuck
with Zope3Book, but I can't quite make heads from tails :(.

So, what am I to do to get myself started towards developing my
application? Is there somewhere a nice introduction beginner-level text
that explains Zope3 fundamental concepts and some simple things you can
do with it?

I would hate myself if I had to give up on Zope3 just because a lack of
documentation :(.

Best regards, and thanks in advance.


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to begin?

2006-03-08 Thread ksmith99

Definately get both books. To save $14-20 per book, I recommend bookpool to
save money
http://www.bookpool.com/ss?qs=zope


--
View this message in context: 
http://www.nabble.com/How-to-begin--t1248831.html#a3310989
Sent from the Zope3 - users forum at Nabble.com.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope3 installation problems on Kubuntu

2006-03-08 Thread Joshua Zeidner
Hello,

 I am using the latest Kubuntu 5.10 Breezy Badger and I am trying
to install Zope3. Its a fresh Kubuntu install. I downloaded
the Zope-3.2.0.tgz file and unpacked it. I then ran the configure
script. Then I ran make and get the following problem. The
same thing happens when I use the SVN repos. It appears to have
something to do with glibs, I checked for the existence of these files
and they are there. Here is some of the shell output:

---

[EMAIL PROTECTED]:~/zope/Zope-3.2.0$ make
/usr/bin/python install.py -q build
In file included from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h:7,

from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:11,

from /usr/include/python2.4/Python.h:18,

from
Dependencies/zope.interface-Zope-3.2.0/zope.interface/_zope_interface_coptimizations.c:15:
/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from Dependencies/zope.interface-Zope-3.2.0/zope.interface/_zope_interface_coptimizations.c:15:
/usr/include/python2.4/Python.h:32:19: error: stdio.h: No such file or directory
/usr/include/python2.4/Python.h:34:5: error: #error Python.h requires that stdio.h define NULL.
/usr/include/python2.4/Python.h:37:20: error: string.h: No such file or directory
/usr/include/python2.4/Python.h:38:19: error: errno.h: No such file or directory
/usr/include/python2.4/Python.h:39:20: error: stdlib.h: No such file or directory
/usr/include/python2.4/Python.h:41:20: error: unistd.h: No such file or directory
/usr/include/python2.4/Python.h:53:20: error: assert.h: No such file or directory
In file included from /usr/include/python2.4/Python.h:55,

from
Dependencies/zope.interface-Zope-3.2.0/zope.interface/_zope_interface_coptimizations.c:15:
/usr/include/python2.4/pyport.h:90:76: error: math.h: No such file or directory
/usr/include/python2.4/pyport.h:97:22: error: sys/time.h: No such file or directory
/usr/include/python2.4/pyport.h:98:18: error: time.h: No such file or directory

...


mail list would not let me send the whole thing
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Zope3 installation problems on Kubuntu

2006-03-08 Thread suresh

Joshua Zeidner wrote:



Hello,

  I am using the latest Kubuntu 5.10 Breezy Badger and I am trying to 
install Zope3.  Its a fresh Kubuntu install.  I downloaded the 
Zope-3.2.0.tgz file and unpacked it.  I then ran the configure script.  
Then I ran make and get the following problem.  The same thing happens 
when I use the SVN repos.  It appears to have something to do with 
glibs, I checked for the existence of these files and they are there.  
Here is some of the shell output:


---

[EMAIL PROTECTED]:~/zope/Zope-3.2.0$ make
/usr/bin/python install.py -q build
In file included from 
/usr/lib/gcc/i486-linux-gnu/4.0.2/include/syslimits.h:7,

 from /usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:11,
 from /usr/include/python2.4/Python.h:18,
 from 
Dependencies/zope.interface-Zope-3.2.0/zope.interface/_zope_interface_coptimizations.c:15:
/usr/lib/gcc/i486-linux-gnu/4.0.2/include/limits.h:122:61: error: 
limits.h: No such file or directory
In file included from 
Dependencies/zope.interface-Zope-3.2.0/zope.interface/_zope_interface_coptimizations.c:15:
/usr/include/python2.4/Python.h:32:19: error: stdio.h: No such file or 
directory


You are missing the Python/C development development libraries.

You will need to get apt-get python-devel among other things.

Suresh

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 installation problems on Kubuntu

2006-03-08 Thread ksmith99

usually on a debian/ubuntu-based system

apt-get install python2.4
apt-get install python2.4-dev
apt-get install build-essential
--
View this message in context: 
http://www.nabble.com/Zope3-installation-problems-on-Kubuntu-t1250448.html#a3314736
Sent from the Zope3 - users forum at Nabble.com.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Principal annotations

2006-03-08 Thread Shane Hathaway
Shane Hathaway wrote:
 Was this an accident?  Did it work at one time?  Are there plans to make
 principal annotation views work again?  And how can I edit user
 annotations in the meanwhile?

No one knows, I guess.  After spending many days on a seemingly simple
problem, I've drawn a blank.

Shane

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Principal annotations

2006-03-08 Thread Tom Dossis


Shane Hathaway wrote:

Shane Hathaway wrote:

Was this an accident?  Did it work at one time?  Are there plans to make
principal annotation views work again?  And how can I edit user
annotations in the meanwhile?


No one knows, I guess.  After spending many days on a seemingly simple
problem, I've drawn a blank.


Not that I've tried this myself (yet).

Re: the ZopeBook example, I'd change the annotation adapter from
IPrincipal to IInternalPrincipal..

adapter
  factory=.info.PrincipalInformation
  provides=.interfaces.IPrincipalInformation
  for=zope.app.authentication.principalfolder.IInternalPrincipal
  permission=zope.ManageServices
  /

I guess you'd also need to make the InternalPrincipal class annotatable,
 in your application configure.zcml, add...

content
 class=zope.app.authentication.principalfolder.InternalPrincipal
 implements
   interface=zope.app.annotation.IAttributeAnnotatable
   /
/content

Also in the example the browser:editform directive should be changed
from IPrincipal to IInternalPrincipal.

Good luck.
-Tom

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Principal annotations

2006-03-08 Thread Tom Dossis

Tom Dossis wrote:


Shane Hathaway wrote:

Shane Hathaway wrote:

Was this an accident?  Did it work at one time?  Are there plans to make
principal annotation views work again?  And how can I edit user
annotations in the meanwhile?


No one knows, I guess.  After spending many days on a seemingly simple
problem, I've drawn a blank.


Not that I've tried this myself (yet).

Re: the ZopeBook example, I'd change the annotation adapter from
IPrincipal to IInternalPrincipal..



Alternatively, it may possible to setup an adapter for 
IInternalPrincipal to IPrincipal ?

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users