Re: [Zope3-Users] Pluggable Authentication and SessionCredentialsPlugin

2005-07-16 Thread Darryl Cousins
On Sat, 2005-07-16 at 01:06 -0400, Stephan Richter wrote:
 On Saturday 16 July 2005 00:07, Darryl Cousins wrote:
  So much for my solution, is there a better way. :-)
 
 Of course. :-)

:-) Yes, I should have written **what's** the better way?  :-)

Thanks for that.

Best regards,
Darryl Cousins

 
 from zope.app.security.interfaces import IUnauthenticatedPrincipal
 
 def isLoggedIn(self):
   return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
 
 Regards,
 Stephan
-- 
Darryl Cousins [EMAIL PROTECTED]
Tree Fern Web Services
106 Sandes St
Thames
New Zealand
**64 (0)7 868 3139

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


Re: [Zope3-Users] Ordered list of sub objects

2005-07-16 Thread Johan Carlsson

Stephan Richter wrote:


You definitely have to write a custom container. In your case I would suggest 
providing an attribute on your container that is also a container and holds 
all those objects that you want to manage via another process.


Thanks for the input.

I'm thinking about implementing a container that would be configurable
through ZCML (would that be configured by assigning interfaces?)
The container would support options to use filters, automatic naming and
order support.

But for now I will probably implement either a custom field or a custom
dedicated interface.


It would have been much clearer, if you would have provided a full use case 
instead of talking about it abstractly.


Sorry if I wasn't clear, here's the use cases:

- User choose (content) type and adds to a list
- User selects and deletes type items
- User selects and moves items in order (up. down, top, bottom)
- User views all of the content items.
- User changes some or all content items and saves changes.

- Plus the use cases for IFolder

From that I realized that the items are unnamed, I other words need to
get a name assigned to it when added.

Regards,
Johan


--
Johan Carlsson  Tel: + 46 8 31 24 94
Colliberty  Mob: + 46 70 558 25 24
Torsgatan 72Email: [EMAIL PROTECTED]
SE-113 37 STOCKHOLM


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


[Zope3-Users] HTTP Post Request Handling

2005-07-16 Thread John Smith
Dear All,

I hope I have the right mailing list. Perhaps someone
can help me with a fairly basic question.

When I used Zope 2, I used the following idiom for
form submission.

Send http POST to Script(Python) or External Method,
which would then return a ZPT like this:
return context.myZPT(arg1=xyz, arg2=abc, etcetera). In
the ZPT, I could then access arg1, arg2 via the
'options' TAL name.

Now, I am getting along OK with Zope3. I understand
that the basic TAL namespaces available in a ZPT are
view, request and context.

As far as I can tell from documentation and examples,
POST requests are handled by the
self.request.response.redirect idiom. My problem with
this method is that it causes the instantiation of a
new view component, so I cannot hold state with the
'view'.

I would be very grateful if anyone could tell me how I
can pass arguments to the rendered page template. I do
not wish to set attributes on the content/context
object as the form values from the POST request are
specific to the request. so I cannot hold state with
the 'context'.

I don't want to use cookies as the form has to work in
environments where cookies are disabled.

I tried searching the interface specification for
'request' to see if there was an analogue of the Zope2
request.setAttribute function, but could not find one.

Any help greatly appreciated, 

thanks, 

John.



___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] can't get files using tortoiseSVN client

2005-07-16 Thread aaron wang

Hello all,

Following the ZOPE3BOOK, 13.1 Step I: Preparation (page 108)

I download the TortoiseSVN 12.1 and installed in my PC/winXP.
Restarted and create a dir as d:\repo, open the folder and right click 
mouse, chose SVNcheckout...

from the context menu.
with the dialog field URL of repository  set to 
http://svn.zope.org/book/trunk;

and the Check out directory set to  d:\repo

click OK button the result always comes out as :
Error: PROPFIND request failed on '/book/trunk'
Error: PROPFIND of '/book/trunk': 301 Moved (http://svn.zope.org)

but with browser the http://svn.zope.org/book/trunk/messageboard is 
reachable.


What's wrong with my operations?
If I have not access to that, should I set to anonymous mode? how?

Thank you

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


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


Re: [Zope3-Users] HTTP Post Request Handling

2005-07-16 Thread Gary Poster


On Jul 16, 2005, at 8:10 PM, John Smith wrote:


Dear All,

I hope I have the right mailing list. Perhaps someone
can help me with a fairly basic question.

When I used Zope 2, I used the following idiom for
form submission.

Send http POST to Script(Python) or External Method,
which would then return a ZPT like this:
return context.myZPT(arg1=xyz, arg2=abc, etcetera). In
the ZPT, I could then access arg1, arg2 via the
'options' TAL name.


FWIW, the same behavior holds true in Zope 3 as well for  
zope.app.pagetemplate.ViewPageTemplateFiles.  They are generally  
attributes on a view class, though, so a method on the view might  
pass arguments to the template (that are then available in 'options',  
as you are familiar).  However, since the template also has the view,  
as you note below, you might not need to.



Now, I am getting along OK with Zope3. I understand
that the basic TAL namespaces available in a ZPT are
view, request and context.

As far as I can tell from documentation and examples,
POST requests are handled by the
self.request.response.redirect idiom.


Actually, no.  The standard idiom is to self-post.  The view class  
(in __call__, at its most primitive level) is then responsible for  
deciding what to draw.  If you do an actual redirect (in Zope 2 and  
Zope 3) then you are responsible for passing things around in the  
query string, or the session, or an annotation, or what have you.



My problem with
this method is that it causes the instantiation of a
new view component, so I cannot hold state with the
'view'.


Why do you need to redirect?  Do you actually mean an HTTP redirect?   
Or are you looking up a different view from within the first view's  
__call__, and rendering it for the first view to return?  Not sure  
what you are doing.



I would be very grateful if anyone could tell me how I
can pass arguments to the rendered page template. I do
not wish to set attributes on the content/context
object as the form values from the POST request are
specific to the request. so I cannot hold state with
the 'context'.

I don't want to use cookies as the form has to work in
environments where cookies are disabled.

I tried searching the interface specification for
'request' to see if there was an analogue of the Zope2
request.setAttribute function, but could not find one.


It is possible to annotate the request, but you shouldn't have to for  
this use case.  That should be used sparingly.


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


RE: [Zope3-Users] can't get files using tortoiseSVN client

2005-07-16 Thread aaron wang

Dear all,
I get answer from this link, 
http://subversion.tigris.org/faq.html#http-301-error

so could anyone please send me the messageboardbuddydemo files to me.

thanks



From: aaron wang [EMAIL PROTECTED]
To: zope3-users@zope.org
Subject: [Zope3-Users] can't get files using tortoiseSVN client
Date: Sun, 17 Jul 2005 02:54:24 +

Hello all,

Following the ZOPE3BOOK, 13.1 Step I: Preparation (page 108)

I download the TortoiseSVN 12.1 and installed in my PC/winXP.
Restarted and create a dir as d:\repo, open the folder and right click 
mouse, chose SVNcheckout...

from the context menu.
with the dialog field URL of repository  set to 
http://svn.zope.org/book/trunk;

and the Check out directory set to  d:\repo

click OK button the result always comes out as :
Error: PROPFIND request failed on '/book/trunk'
Error: PROPFIND of '/book/trunk': 301 Moved (http://svn.zope.org)

but with browser the http://svn.zope.org/book/trunk/messageboard is 
reachable.


What's wrong with my operations?
If I have not access to that, should I set to anonymous mode? how?

Thank you

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


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


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


Re[2]: [Zope3-Users] can't get files using tortoiseSVN client

2005-07-16 Thread Adam Groszer
Hello aaron,

You will have to enter the URL
svn://svn.zope.org/repos/main/book/trunk
into TortoiseSVN. That works for me.


Sunday, July 17, 2005, 5:50:16 AM, you wrote:

 Dear all,
 I get answer from this link, 
 http://subversion.tigris.org/faq.html#http-301-error
 so could anyone please send me the messageboardbuddydemo files to me.

 thanks


From: aaron wang [EMAIL PROTECTED]
To: zope3-users@zope.org
Subject: [Zope3-Users] can't get files using tortoiseSVN client
Date: Sun, 17 Jul 2005 02:54:24 +

Hello all,

Following the ZOPE3BOOK, 13.1 Step I: Preparation (page 108)

I download the TortoiseSVN 12.1 and installed in my PC/winXP.
Restarted and create a dir as d:\repo, open the folder and right click
mouse, chose SVNcheckout...
from the context menu.
with the dialog field URL of repository  set to 
http://svn.zope.org/book/trunk;
and the Check out directory set to  d:\repo

click OK button the result always comes out as :
Error: PROPFIND request failed on '/book/trunk'
Error: PROPFIND of '/book/trunk': 301 Moved (http://svn.zope.org)

but with browser the http://svn.zope.org/book/trunk/messageboard is 
reachable.

What's wrong with my operations?
If I have not access to that, should I set to anonymous mode? how?

Thank you

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/

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

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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



-- 
Best regards,
 Adammailto:[EMAIL PROTECTED]


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