Re: [Zope3-dev] RE: [Zope3-Users] feedback while asking response

2005-04-13 Thread Stephan Richter
On Wednesday 13 April 2005 10:16, Roger Ineichen wrote:
   i.e.
   method(self):
     - output some start-text
     sleep 10s
     - output some text
     sleep 10s
     - output some end-text
  
   any ideas?
 
  I am pretty sure it does not.

 Correct, it is not this easy,

 I think you looking for a mechanism where you can write
 to the response. This is possible but don't ask me how
 dis is done correctly.

You can do this by directly writing to the response and not returning anything 
through the executing method:

class View(object):

  def __call__(self):
response = self.request.response
# ... set all necessary headers
response.write(data)
   sleep(10)
response.write(data)
   sleep(10)
   response.write(data)

To Roger: Please make sure you are replying to zope3-users, if that's where 
the mail originates. :-) Recently you tend to send everything to zope3-dev.

Regardsm
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to organize common code for Z2 and Z3

2005-04-13 Thread Stephan Richter
On Wednesday 13 April 2005 10:31, Andreas Jung wrote:
 I am currently working on TextIndexNG V3 with the goal to have its
 functionality available
 for Zope 2 and Zope 3 (means a common code base). Are there recommendations
 or experiences
 how to structure code and test? E.g. at the moment everything lives under
 Products/TextIndexNG3.
 Unittest scripts perform imports from Products.TextIndexNG3...which is fine
 for Zope 2
 but properly not for Zope 3. So what the best way to deal with common code
 on both platforms?

I knew this would happen some day, and I have thought for a long time about it 
already. :-) I think the trick would be to write code for Zope 3 and put it 
in a top-level package, like textindexng. Inside this package you add a 
package TextIndexNG that is expected to be added to Zope 2's 
lib/python/Products.

So the tricky part is to not run the tests in textindexng/TextIndexNG when 
testing from Zope 3's test runner. I could work with you on some testing 
support for this.

So in effect, in Zope 3 you would have:

src/textindexng
  +-- TextIndexNG (not used or even distributed)

In Zope 2:

lib/python
  +-- textindexng
  +-- Products
  +-- TextIndexNG

I think this would be a usable pattern; what do you think?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question/Problem with UserPreferences

2005-06-10 Thread Stephan Richter
On Friday 10 June 2005 14:13, Florian Lindner wrote:
  This is not a preferences error, but a pagetemplate one. I have no clue
  what could have gone wrong here. Can you try a different name? Maybe
  something like `email1`? I suspect a clash of variable names.

 I've tried email1 and emailX as variable names. Both produce exactly the
 same error.
 I got no idea what is wrong there...

Can you attach the entire PT script?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Zope 3.1.0 Zope3 Developer's Book

2005-06-18 Thread Stephan Richter
On Saturday 18 June 2005 15:19, Corey wrote:
 Question: with all these new changes since 3.0 ( which all look very good!
 ), approximately how much of the Zope3 Dev Book becomes
 misleading/incorrect/obsolete? Primarily I'm wondering whether it is still
 possible to use the Zope3 dev book , follow along with it's
 examples/excersises without constantly running into troubles?

Yeah, I think that most of it will still work just fine. I think someone 
reported that step 7 or 8 of the messageboard product was still working on 
the trunk, which is impressive. Before the final release I will take some 
time and make sure that all the packages will still work without 
modification.

 Right off the bat, I can see that the stuff on Services will be a point of
 hassle and confusion for many people starting off w/ Zope 3.1 and the
 current Zope3 dev guide.

Right, this cannot be avoided. But I already talk very little about services 
in the book.

 Are there prospective plans to keep the book updated with the releases, or
 are there simply not enough resources/time available at this point to do
 so?

I am not sure how much time I will have. I am very booked till school starts 
again. I would need at least a week to get everything updated, not to mention 
covering new features.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ZDaemonTests testUmask error

2005-06-21 Thread Stephan Richter
On Tuesday 21 June 2005 02:56, Alen Stanisic wrote:
 This is the only error I get when running 'make check' should this be of
 major concern?

It's not a big concern, but it would be nice, if it could be fixed. If you 
have a patch, send it in.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: login required on download zope3 page?

2005-06-21 Thread Stephan Richter
On Tuesday 21 June 2005 01:22, Michael Haubenwallner wrote:
 Processing the queue by hand solves the problem.

How can I do that?

I think we need to add a small section for these FAQs to the release making 
page.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zsync

2005-06-21 Thread Stephan Richter
On Tuesday 21 June 2005 00:50, Corey wrote:
 Is zsync really only necessary if you do TTW development w/ Zope3?

 Is it still being developed, or is it stable?  ( I just noticed the
 synchonization chapter in the Zope3 Dev book was excluded )

zsync has not been developed for a long time and I would not consider it 
stable, though most of the stuff should work.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Presentation Components

2005-06-22 Thread Stephan Richter
On Wednesday 22 June 2005 18:18, Corey wrote:
 In the Zope3 dev book, section 7.5:

 In fact, in future versions of Zope 3, the presentation service will be
 removed and presentation components will become adapters

 Did this happen in Zope3.1?

Yes, it is part of the largest change for Zoep 3.1, the removal of services.

 If so, where can I found more information regarding the changes?

Read the CHANGES.txt. If you want to know the internal scoop, read the *.txt 
files in zope.component and zope.app.component.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] complete newbe question

2005-06-23 Thread Stephan Richter
On Monday 20 June 2005 13:30, smok wrote:
 When one opens //localhost:8080/ then comes this standard screen
 with all    objects listed with some additional information,
 through which one can browse and display etc. If there is a skin defined at
 the top one can see for ex. worldcookery logo. I can create my own add,
 edit pages for every object, but I cannot for the main one.

You have to write a custom contents.html view for IFolder. There are a couple 
more views like that for a folder and they are registered via the 
browser:containerViews directive.

 So how can I do this? And going further, how would I be able to
 access all defined objects from main page (how can I make on my own what
 now is automatic).

I don't understand what you mean by access all defined objects from main 
page. You need to be more specific.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Complex views implementes in Python

2005-06-23 Thread Stephan Richter
On Monday 20 June 2005 11:39, Nicolas Legault wrote:
 After examining the worldcookery PDF example, I see how to implement the
 generation of the image, what I don't understant is how to include this in
 an HTML with a form and pass these value to the graph function.

 A long time ago I've implemented a web page like this in 100% pure code and
 what I've done was:

 - Examine the GET/POST to get passed parameter.
 - used default value for blank parameter.
 - create the graph and write it on a temporary name on HD.
 - construct the HTML returned code with a img src=... pointing to the
 graph
 - return the code to the remote browser.

You want to write two views. One that displays the graph and the form and 
another that generates the graph. There are several options here:

1. You have a custom content object that stores the configuration from the 
HTML. During image generation, you simply use the data.

2. The HTML data is simply encoded in the image source URL and is used by the 
image generating view:

  img src=.../graph.jpg?x-axis-max=20... /

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] pluggable authentication utility

2005-06-23 Thread Stephan Richter
On Saturday 18 June 2005 13:36, Garrett Smith wrote:
  For 3.2, we need to find a way to make this clearer.  Either we need
  to provide a more verbose description of what the name is for or
  perhaps, as Stephan has suggested, for components that are always
  looked up without names, we should not provide the option of entering
  a name and, for others, we should require a name.

 IMO, the PAU pattern of not taking a name works well. The confusion
 above may be a hold-over from the time when PAU regs did accept names.

Right. In my opinion all nameless utilities are what services used to be. I 
have not yet seen an exception to this rule. The terminology I introduced for 
them in the new Tools UI (now called Site Management) is Unique Utilities, 
since they are unique to a given site.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Skin permissions: viewing wiithout login?

2005-06-23 Thread Stephan Richter
On Wednesday 15 June 2005 12:42, [EMAIL PROTECTED] wrote:
 After implementing my own skin, I get the request to log on (as manager),
 while visiting a normal site page.

 I do not have my zcml's at hand right now. Maybe somebody has an idea of
 what trap I walked into.

I have no clue what could have gone wrong. But try to make your permissions 
zope.View too.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Using a multicheckboxwidget instead of a multiselectsetwidget

2005-06-23 Thread Stephan Richter
On Wednesday 08 June 2005 10:43, Jan-Wijbrand Kolman wrote:
 In mywidgets.py:

   from zope.app.form.browser import MultiCheckBoxWidget as
 MultiCheckBoxWidget_ def MultiCheckBoxWidget(field, request):
     vocabulary = field.value_type.vocabulary
     return MultiCheckBoxWidget_(field, vocabulary, request)

 In the configure.zcml:

   addform
     name=add_foo
     label=Add Foo
     schema=.interfaces.IFoo
     fields=filetypes
     content_factory=.foo.Foo
     template=foo.pt
     permission=zope.Public
   
   widget
     field=filetypes
     class=.mywidgets.MultiCheckBoxWidget
   /
   /addform

 Probably there're better ways to do this...?

No, this is a good solution and should be incorporated into zope.app.form 
somehow.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Announcement - jsonserver 1.0 alpha, JSON-RPC for Zope3

2005-06-23 Thread Stephan Richter
On Monday 06 June 2005 17:16, Jim Washington wrote:
 Announcing:  jsonserver 1.0 alpha.

 The code is at subversion repository:

 http://brigadoon.hill-street.net/svn/repos/jsonserver .

 Username 'anonymous' with blank password has read-only access.

Congratulations, though I know its late! :-) There might be some interest in 
the Z3-ECM community of a JSON server.

BTW, I have also deicded that I will tackle the HTTPRequestFactory issue for 
3.2 by developing some sort of registry based on subscribers that decides 
based on registered subscribers which request to create. This way all you 
need to do is to register a new subscriber to hook up a new HTTP extension. 
Maybe I make it a utility, I don't know. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Hi, I'm new here

2005-07-15 Thread Stephan Richter
On Monday 11 July 2005 00:15, Chris Withers wrote:
 Well, it's ALMOST true, since you guys have done so much amazing work
 since I last looked in!

Sorry for the delayed answer.

 Anyway, as a newbie, I got some questions:

 - What docs should I read first?

- Read my and Phillip's books. They should get you started very well in 
developing useful code.

- Read the README.txt files in the packages. They became a major focus point 
of our in-code documentation.

- Look at the API doctool for references and dynamic API documentation. The 
API doctool also organizes most README.txt files into some sort of structure 
and provides a nice overview of them.

 - How do I get Zope 3 up and running on Windows, and what's the best
 version for me to try?

Use Zope 3.1 beta 1. There is a Windows isntaller.

 - Where can I find good reference docs? What books should I buy?

API doctool. http://localhost:8080/++apidoc++

Since the API docs are generated dynamically, it will have as little or as 
much as you have packages installed. In fact, you can even include your third 
party packages using some ZCML. See the ZWiki pacakge.

 - Are there any good example apps I can look at so I can build my first
 app, which is likely to be Swishdot ;-)

ZWiki and Bugtracker, both in the trunk, are two sample apps, but have not 
been modernized for a while. My book also features the messageboard package, 
which is in good shape I think.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
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-15 Thread Stephan Richter
On Friday 15 July 2005 08:06, Johan Carlsson wrote:
 Hi all,
 I want to have a list of ordered sub objects (potentially if different
 types) for an object.

 I don't want the subjects to be added via the normal Add method, but
 I want to implement my own UI for the adding, delete, and ordering.
 And I don't want them to turn up in the normal contents view.

 The patent objects should also be containerish, e.g. contain other
 types of objects, of different types, that I would like to use the
 normal Add facility for and show up in the normal Contents view.

 The question is how I should go about and solve this and what
 possibilities Zope 3 already got to solve it?

 I'm guessing between having to separate container interfaces
 for the object, using the special case container interface
 with my custom content view.

 Or implement a ordered list field that can take sub objects
 of different types.

 I haven't fully grasped what is possible with the stock fields
 (for instance List in combination with more advanced fields as
 value_type,  I haven't found any documentation r example using this,
 pointer would be appreciated :-)

 Any tips?

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.

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

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] (no subject)

2005-07-15 Thread Stephan Richter
On Thursday 14 July 2005 04:39, aaron wang wrote:
 anyone has a website powered with zope3 ?

I think there are a couple out there, but I do not know whether they are 
public.

 free zope3 site hosting avaliable somewhere?

I think you best shot would be to contact some of the free Zope 2 hosters.

 I want learn to start a website for myself with zope3/python. 
 but I am totoally a newcomer, I have my environment installed for that. I
 am reading zope3book ..., but I think I need all your excellent guys to
 help some

Feel free to ask questions here.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Inline code in ZPT

2005-07-15 Thread Stephan Richter
On Wednesday 06 July 2005 15:47, Nicolas Legault wrote:
 1:
 Is it possible to have Inline code in a page template that is created on
 the host file system, not throught the ZMI ? 

Yes.

 I got an error that inline code is not activated, where do I activate it ?

Right, by default inline code is deactivated. You would have to write some 
custom code to accomplish that. However, we discourage people to add Python 
code in page templates.

 2:
 Is it a bug or this code is now not supported in Zope 3.1 ZPT ?

           01 htmlbody
           02   script type=text/server-python
           03     global x
           04     x = Hello World!
           05   /script
           06   b tal:content=x /
           07 /body/html
 this code is from
 http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3GUI

For some reason this example does not work, since the variable x is not 
exported beyond the script tag. For some reason the global x call does not 
do what it used to do.

 If it's not supported anymore, is there a way to return values from the
 python script and use them in the zpt ?

Florian gave you the right answer.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Getting all principals from PAU

2005-07-15 Thread Stephan Richter
On Tuesday 28 June 2005 15:51, Florian Lindner wrote:
 But I suspect this code to be highly dependend of the principal folder.

Correct.

 What is the best and most generic way to do that?

This is not so easy, since every queriable could have a different API for 
searching. A queriable always describes a search schema. From this search 
schema you can build a query mapping that is passed into the search() 
function of the queriable. I think you best bet would be to choose the 
default value for each field. Here some untested code:

user_ids = []
for name, queriable in pau.getQueriables():
  q = {}
  for n, f in queriable.schema.namesAndDescriptions():
q[n] = f.default
  user_ids += list(queriable.search(q))  

users = [pau.getPrincipal(id) for id in user_ids]

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Pluggable Authentication and SessionCredentialsPlugin

2005-07-15 Thread Stephan Richter
On Thursday 23 June 2005 21:52, Darryl Cousins wrote:
 and as such has **no getLogin method**.

This is correct. zope.security.interfaces.IPrincipal does nto specify a 
getLogin() method.

 I would have expected it to provide InternalPrincipal as it appears to
 in default/PluggableAuthenticatin/principals/testuser/@@introspector

No, the InternalPrincipal is only the data container. A principal is always 
generated for each request. This is a new paradigm in the authentication 
code.

 Any suggestions?

Why do you need getLogin? The id or title of the principal are commonly 
available. The login name is usually protected information.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Pluggable Authentication and SessionCredentialsPlugin

2005-07-15 Thread Stephan Richter
On Saturday 16 July 2005 00:07, Darryl Cousins wrote:
 So much for my solution, is there a better way. :-)

Of course. :-)

from zope.app.security.interfaces import IUnauthenticatedPrincipal

def isLoggedIn(self):
  return not IUnauthenticatedPrincipal.providedBy(self.request.principal)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Announcement - jsonserver 1.0 beta1, JSON-RPC for Zope3

2005-07-29 Thread Stephan Richter
On Wednesday 27 July 2005 10:42, Jim Washington wrote:
 jsonserver is an implementation of JSON-RPC for Zope 3.  It enhances
 Zope 3's http server to listen for content-type of 'text/x-json' and
 allows json-rpc methods.  json-rpc methods are used like xml-rpc methods.

Hi Jim,

please feel free to send me or the list some initial feedback about the APIs 
that could be easier and would make this product more simple. I will soon 
write a proposal and I would like to collect some initial use 
cases/ideas/suggestions before starting.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Multi-directional adapters.

2005-08-01 Thread Stephan Richter
On Wednesday 27 July 2005 10:04, Alec Munro wrote:
 I'm sure I'm using the wrong terminology, so here's what I'm trying to do.
 I have a generic container type (someContainer), and a specific object
 type (objA). objA can only be contained within AContainer (or
 containers that implement IAContainer), so in order to add objA to
 someContainer, we would need an adapter between IAContainer and
 IsomeContainer. To complicate the mix, there is no such adapter
 (because I don't want objA stored in someContainer). However, there is
 an adapter between IBContainer, and IsomeContainer. There is also an
 adapter between IobjA and IobjB.

This use case has been solved for a long time using the API of 
zope.app.containers.constraints and is documented in several places.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Properties of content components as containers.

2005-08-01 Thread Stephan Richter
On Monday 25 July 2005 13:22, Alec Munro wrote:
 Writing it out, it seems like the second method is probably the more
 correct one, but I would appreciate people's opinions, as I have much
 to learn.

I think it would be good for you to read Phillip and my book. We cover those 
sort of cases.

Regardsm
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Providing schema information to Flash

2005-08-01 Thread Stephan Richter
On Thursday 21 July 2005 13:09, Alec Munro wrote:
 We're building a fairly sophisticated application that uses Flash as
 it's primary front end. I would really like to keep the specific data
 logic in Flash as simple as possible. I have a good communication
 setup using JSON-RPC (thanks to Jim Washington!), and now I want to
 expand on it, and figure out a good way to provide Flash with
 information about what types of data it should expect. I'm not sure
 how to accomplish this. My initial idea was to provide information
 about the interfaces to Flash, and allow Flash to interpret those.

 Any advice on the best way to proceed would be very helpful.

I think the above sounds like a good approach. Note that you could also 
develop Flash widgets, like we have HTML widgets now, that could have all 
sorts of things they can send to the Flash application.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Using attributes in a nameChooser

2005-08-05 Thread Stephan Richter
On Friday 05 August 2005 06:25, Florian Lindner wrote:
 in a Containers chooseName function I want to use a attribute of the
 created object:

     def chooseName(self, name, object):
         return object.name


   File
 /home/florian/Desktop/zope/lib/python/CS/ContentFolder/contentfolder.py,
 line 15, in chooseName
     return object.name
 AttributeError: 'Link' object has no attribute 'name'


 Even though apidoc says there is a attribute name.

 Or is it impossible to access the attributes at this time of the creation
 process?

Simply start the debugger to see what's going on.

import pdb; pdb.set_trace()

inside the chooseName method and you can inspect the object. You might have to 
say up once first to access it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-10 Thread Stephan Richter
On Wednesday 10 August 2005 14:01, James Allwyn wrote:
 I would appreciate any guidance on what the
 recommended Zope3-ish way of handling this would be. I
 feel the options are either to create a generic
 IProperty object, and subclass it to IHouse,
 ICateredHall, ISelfCateredHall, IHomeStay, or
 whatever, which each add extra features or
 constraints; or to go down some sort of adapter route.

In this particular case I would go with sub-classing, though usually I 
recommend the use of adapters. Basically, if the additional feature you try 
to implement has to do with the object's behavior in the system, it should be 
in an adapter. If the feature is characteristic of the object inside any 
system, it should be directly provided by the object.

 Regarding the Adapters route, in his book Phillip
 gives an analogy of Interfaces as a contract that an
 object uses to promise its functionality. If an
 Interface promises that an object will have a given
 method, does it have to provide it directly, or can it
 use an adapter to provide it?

If an object promises it provides an interface it has to do so directly, not 
via an adapter.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Stephan Richter
On Friday 12 August 2005 04:20, Dominik Huber wrote:
 Your question points out the general problematic the implementation
 decision between classification and composition. Zope 3 has the power to
 reduce an object to its *pure* identity and implement all further
 functionality by adapters and annotated objects (see
 zope.app.annotation). This possibility allows you to build objects
 heavily throu composition. In extreme case the classification aspect is
 *only* used to determine the adapter lookups and other registration
 aspects.

 Therefore it will be usefull to use interfaces to build the above
 classification, but - and that's very important - that does not mean
 that you transfer this classification directly to your deeper
 implementation (classes), but you could use *pure* marker interfaces for
 that classification purpose too. Those pure marker interfaces could mark
 instances of a generic object implementation [1].

Right, I know you follow this approach with Tiks and it is probably a good 
approach for CMSs, where everything depends on the behavior in the system, 
but for regular applications its bogus. I really expect my core objects to 
have a core functionality.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Stephan Richter
On Thursday 11 August 2005 06:36, James Allwyn wrote:
 If so, I guess we will be building an adapter along
 similar lines to the size adapter both Stephan and
 Phillip use as an example in their books - maybe
 create an IRating interface, and create adapters for
 each of the sub-classes to adapt those to IRating?

Yep.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.schema.Object - Object of Objects

2005-08-28 Thread Stephan Richter
On Thursday 25 August 2005 21:14, Christian Lueck wrote:
 I want to define add- and edit-views for objects of objects with
 zope.schema.Object and zope.app.form.browser.ObjectWidget.  Roger
 Ineichen and Andreas Reuleaux explained (on this list) howto write
 custom widgets for objects.  I was trying to define a widget for objects
 of objects (objects which's attributes are objects again), but didn't
 get it for days.  Tonight I got it!  Since there is not yet a posting on
 this problem on the list I decided to post it.  Maybe this is a
 zope3-newbie problem, but maybe this list is the right place for these
 kinds of problems.

I think you could add this to the Zope 3 wiki. This way it is at a central 
location.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.schema.Object - Object of Objects

2005-08-28 Thread Stephan Richter
On Sunday 28 August 2005 17:41, Stephan Richter wrote:
 On Thursday 25 August 2005 21:14, Christian Lueck wrote:
  I want to define add- and edit-views for objects of objects with
  zope.schema.Object and zope.app.form.browser.ObjectWidget.  Roger
  Ineichen and Andreas Reuleaux explained (on this list) howto write
  custom widgets for objects.  I was trying to define a widget for objects
  of objects (objects which's attributes are objects again), but didn't
  get it for days.  Tonight I got it!  Since there is not yet a posting on
  this problem on the list I decided to post it.  Maybe this is a
  zope3-newbie problem, but maybe this list is the right place for these
  kinds of problems.

 I think you could add this to the Zope 3 wiki. This way it is at a central
 location.

or even better, write a doctest in ReST and check it into 
zope.app.form.browser or just in the doc directory.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Accessing adapter methods from zpt

2005-08-28 Thread Stephan Richter
On Wednesday 17 August 2005 12:32, Michael van Slingerland wrote:
 I had the feeling that views needed to be used but it looked so
 inefficient. Is there a thought/philosophy behind the fact that we can't
 access adapters directly from ZPT?

Yes, looking up adapters is programming and ZPT should be only for templating. 
All programming should be done in view classes.
 
Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Using attributes in a nameChooser

2005-08-28 Thread Stephan Richter
On Saturday 06 August 2005 07:55, Florian Lindner wrote:
 Let me explain why I want to do that. I still have the problem that I want
 to enable to user to enter the __name__ of the object on creation (in the
 addform).
 Now it's working more or less. In the chooseName function I read out name
 attribute and return this name. One problem of this method is that I can
 not really return an validation error of the name field if the name is
 already taken. AFAIK I can't develop a custom schema field that validates
 it before, because fields do not have access to their objects.

 What do you think is the best solution of the problem above? Simply that
 the user could choose a name of the object.

Just write your custom view class, overriding the update() method.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] resized images

2005-08-28 Thread Stephan Richter
On Wednesday 10 August 2005 14:46, [EMAIL PROTECTED] wrote:
 I'd like to add images to an container but want them to be resized with
 PIL. I assume I need a custom factory for that that sizes the image before
 creating the content type.

 The question I have is that I'm not sure if I can create a custom factory
 for the already existing image content type directly. Or if I need to
 subclass Image class and create the custom factory for that?

 Can some body please clarify what's the best method to achieve this?

I think you can just create a new factory and make a custom add menu entry. 
That should be all.

Regards,
stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] write a product keeping the customization of the instances in mind

2005-08-28 Thread Stephan Richter
On Tuesday 16 August 2005 06:29, Christoph Frick wrote:
 c) the whole product needs beside the visual customization by the admin
    also one piece of software - a script that handles the upload. for
    the old version of the software (zope2) we forced an external method
    with a certain name.

I do not understand your question.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] write a product keeping the customization of the instances in mind

2005-08-28 Thread Stephan Richter
On Tuesday 16 August 2005 06:29, Christoph Frick wrote:
 for b) and c) i simply thought about forcing the user to subclass my
 implementation and simply do what they want - but of course it would be
 nicer, if you dont have to be a developer to install the product (even
 if you have at least to write a script that handles the upload).

Never make subclassing an object to extend anything in Zope 3. Anyways, for 
point (b) you have not told us about your use case. I think you are on the 
wrong track there.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Patterns in Zope3

2005-09-11 Thread Stephan Richter
On Thursday 01 September 2005 14:44, Antonio Beamud Montero wrote:
 If I create a Component Client and a component Invoice,
 - it's better put all the instances inside se same folder or create two
 folders, a folder clients and a folder invoices?

There are different approaches:

1. Create Client components living in a Clients folder that can contain 
invoices. I use this pattern in my book.

2. Create Client components living in a Clients folder that have an attribute 
called invoices that is a folder. This one is used sometimes in Zope 3 core.

3. Create Client and Invoice components that live in Clients and Invoices 
folders respectively and create relationship objects linking them to each 
other. This approach is used by SchoolTool and I like it a lot. You can use 
SchoolTool's relationship package.

 Where I can find patterns in zope 3 design apps?

Well, different people use different patterns. It's up to you.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Object Name field on addforms

2005-09-11 Thread Stephan Richter
On Sunday 11 September 2005 09:04, Florian Lindner wrote:
 I have a Container (implementing IContainer, Interface (via Interface
 inheritance) and via ZCML IAttributeAnnotatable and IContentContainer.

 On the auto-generated addform in my layer the Object Name is not shown.
 Why?

Because your container does not implement IContainerNamesContainer.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Object Name field on addforms

2005-09-11 Thread Stephan Richter
On Sunday 11 September 2005 10:07, Florian Lindner wrote:
 The field is displayed when the addform is called with
 folder/+/AddCSLink.html.

In this case AddCSLink.html is a view for IAdding.

 When folder/AddCSLink.html is is not displayed.

Here AddCSLink.html is a view of IContainer.

 What is the difference between these two?

I am surprised both would work. Only the first one should.

 Unfortunatly when you use the addform directive to register a menu item the
 action is folder/AddCSLink.html. Can this be changed?

Don't use the menu/title attributes of form:addform. Use the 
browser:addMenuItem directive instead.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Calling createAndAdd with different object id

2005-09-11 Thread Stephan Richter
On Saturday 10 September 2005 11:05, Florian Lindner wrote:
 I want to override the createAndAdd method mothed in a view class. Since I
 don't want to do all the work I want to derive my class from the AddView
 class from /home/florian/Zope3/src/zope/app/form/browser/add.py. The only
 thing I do in my class is to change the name (object id) of the object to
 be created. In the arguments of the createAndAdd method I have not found
 any information about the id. How can I alter the name?

Use INameChooser or implement an alternate __setitem__ method in your 
container code.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Using building blocks for forms

2005-09-11 Thread Stephan Richter
On Friday 02 September 2005 10:56, Florian Lindner wrote:
 It would be nice if I can reuse parts of the auto generated form. For
 example the error reporting of the fields. Is that possible? Or do I need
 to redo everything when using a template?

For more pythonic and flexible forms use zc.formlib.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Fields are not inherited

2005-09-12 Thread Stephan Richter
On Monday 12 September 2005 13:30, Florian Lindner wrote:
 class IContentItem(Interface):
     The ContentItem object works as a base class for all other content
 objects.

     def __setitem__(name, object):
         Add a IContentItem object.
        
         title = TextLine(
                      title = uName,
                      description = uName that will be part of the URL,
                      required = True)                  
                    
         description = TextLine (
                       title = uDescription,
                       description = uDescription of the object.,
                       required = False)

You got the indentation wrong.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Advanced usage of Z3 schemas...

2005-10-03 Thread Stephan Richter
On Monday 03 October 2005 10:22, Gary Poster wrote:
  I am currently thinking about for a new version of PloneCollectorNG  
  based on Zope 3. The currently implementation uses per-instances  
  schemas (acquired from a parent object managing the schema). How  
  would you do that in Zope 3?

 It sounds like you want persistent schemas.  Although there is some  
 code in Zope 3 going in that direction, to my knowledge it does not  
 work right now.

Right, we all need to bug Jim to fix that! :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zcml grants for plugin-auth'ed principals?

2005-10-11 Thread Stephan Richter
On Monday 10 October 2005 10:45, Dylan Reinhardt wrote:
 Sounds like ZCML isn't the right mechanism for what I want to do.
 Probably, I'll just hack out a config file format and write a quick
 script to (re)grant permissions on a live system.

I think the Zope 3 answer might be to write a custom global authentication 
utility that uses the LDAP users in addition to the ones defined in ZCML. 
What do you think about this solution?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3 equivalent to Zope 2 filestream_iterator?

2005-10-12 Thread Stephan Richter
On Wednesday 12 October 2005 09:38, Johan Carlsson wrote:
 Is there a Zope3 equivalent to the Zope 2 filestream_iterator?

 A quick search in the source turned up nil!

Well, for 3.2 we changed the publisher interface. You can now return IResult 
objects. The output in the IResult object can be any iterator, including a 
buffer, file or whatever.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is __docformat___ necessary in 3.1 onwards?

2005-10-18 Thread Stephan Richter
On Monday 03 October 2005 02:05, baiju m wrote:
 Should I give __docformat___ = 'restructuredtext'
 in newly writing codes ?

Yes, the default is still structured text until we feel comfortable that 
nearly all docstrings have been converted, which will probably be never. ;-)

 BTW, I think an FAQ indexer like PyGTK FAQ
 (http://www.async.com.br/faq/pygtk/index.py?req=index)
 will be very nice, anything like that exists?
 (I expects lots of silly questions to be answared)

Feel free to start an FAQ like this one. It would certainly be very helpful to 
many people.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.app.catalog doc question

2005-10-18 Thread Stephan Richter
On Friday 30 September 2005 15:52, Duncan McGreggor wrote:
 since apply() does expect the rhs of the parameter to be a sequence.  
 With this change, my code now works (no errors, anyway), but I wanted  
 to see if this was a misunderstanding on my part or a documentation  
 typo...

If the above is a doctest it will actually work, but I don't know why. I think 
this is a good issue to bring up on zope3-dev or even file an issue for it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Override a browser class

2005-10-18 Thread Stephan Richter
On Monday 03 October 2005 04:09, Johan Carlsson wrote:
 PS. The reason I want to change pasteable is that it
 raises an exception if the paste action is unknown.
 I'm implementing a clone action as an extra variation
 of copy and it works in my classes but if I point
 to a stock object (with anything I want to clone in
 the clipbook) I get an error due to the raise.

 My override returns False if the paste action is unknown.

 Any core developer that has any opinion on this?
 Can it be changed in the core or is there a specific
 reason for the raise?

You should bring up the issue on zope3-dev. I have no opinion about it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] folder list in a vocabulary

2005-10-18 Thread Stephan Richter
On Tuesday 18 October 2005 08:32, [EMAIL PROTECTED] wrote:
 I'm stuck 'cause I can't make out how to obtain the list of objects,
 contained in the authors folder, from the vocabulary context.

The easiest would be to get the site:

site = zope.component.hooks.getSite()

This should be main, so that

site['authors'].keys()

is what you want.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] make check

2005-10-26 Thread Stephan Richter
On Wednesday 26 October 2005 16:26, Jim Fulton wrote:
  AssertionError: spawned process failed to start in a minute
 
  Is this serious? How could I get this test to pass?

 Don't run the tests as root.

I see this error sporatically using a non-root user as well. I just never 
worry about it. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Products

2005-10-27 Thread Stephan Richter
On Thursday 27 October 2005 08:34, [EMAIL PROTECTED] wrote:
     How to add self made products in ZOPE 3?

First I'll note that the Zope 2 products do not work in Zope 3. Secondly, they 
are not called products anymore; they are just Python packages.

Now, you can add any Python package you want anywhere you like, as long as it 
is in the Python path. In order to hook up the ZCML to the startup process, 
please look at packages like zope.app.preference to see how they implemented 
it; the files you are interested in are SETUP.cfg and 
preference-configure.zcml.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Products

2005-10-27 Thread Stephan Richter
On Thursday 27 October 2005 09:23, [EMAIL PROTECTED] wrote:
    Is there a development environment for Python?

WingIDE is really good. There are others, like Boa Constructor, Eric plugins, 
etc.

Most core developers use Emacs, some use VIM.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Freeze approaching quickly

2005-10-27 Thread Stephan Richter
Hi everyone,

with October winding down, the freeze on the trunk is coming quickly. So, if 
you have any outstanding work, now is the time to get it done. During the 
last week I have monitored the proposals and branches a bit and I think most 
people are done with their work. 

After Michael told me that WebDAV has to wait until 3.3., the only outstanding 
projects are:

- Dimitry (hdima): Merge the password manager branch. I know he is close, so I 
am not worried.

- Jim (J1m): Merge the new zope.testing framework. I am not worried about this 
either.

- Stephan and other interested parties (srichter): Finish the static apidoc 
generator script. I don't know whether I will get done, because I have other 
things to do. The worst case scenario will be that there is no static apidoc 
for 3.2.

- Roger (projekt01): He mentioned to me that he will fix the Boston skin to 
the new content provider and viewlet APIs. Since I think that the Boston skin 
is very pretty and a good show case of the new APIs, I want to include it 
into the release, if the work is done on Tuesday.

Did I miss anyone? Now is the time to speak up!

Once the feature freeze is complete, I would like to keep the trunk frozen for 
about a month, so that the contribution bar for bug fixes remains as low as 
possible. And bugs we have plenty. As people start using Zope 3, we have had 
quiet a number of reports, some of which are really serious, like i18nextract 
being broken.

Thus I propose two bug days:

- Firday, November 4, 2005

- Friday, December 2, 2005

What do you guys think? Would people commit time on those days to the effort?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope3-dev] Freeze approaching quickly

2005-10-27 Thread Stephan Richter
On Thursday 27 October 2005 10:33, Julien Anguenot wrote:
 Is it ok for everybody ?

Yep, since another core developer was involved in the proposal, this is fine. 
I assume Jim had something to say about this already too.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-dev] Re: [Zope3-Users] Freeze approaching quickly

2005-10-28 Thread Stephan Richter
On Friday 28 October 2005 06:55, Dmitry Vasiliev wrote:
  - Dimitry (hdima): Merge the password manager branch. I know he is close,
  so I am not worried.

 Done

Thanks a lot!

  Thus I propose two bug days:
 
  - Firday, November 4, 2005
 
  - Friday, December 2, 2005
 
  What do you guys think? Would people commit time on those days to the
  effort?

 I don't know about those days but now I've just switched myself in the
 bug-fixing mode untill the release.

Yipee! I know you don't need bug days to fix bugs. You have bug months! :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] /++apidoc++

2005-10-29 Thread Stephan Richter
On Friday 28 October 2005 18:42, Paul Dumais wrote:
 I have installed both the release version and the svn checkout version
 of the latest Zope3. I notice that the /++apidoc++ page is not
 available in the checked out version. It worked fine in the release.
 How can I debug this for my install? I noticed that I did not make an
 instance this time around. Is that important? My tests ran without a
 hitch, so I wonder why this isn't working.

apidoc is only turned on in devmode. Due to my lack of understanding of 
ZConfig, it was turned off by default. I fixed it finally to be turned on 
again. Just update your checkout.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Help us! Calling a Python Script from ZPT

2005-10-29 Thread Stephan Richter
On Saturday 29 October 2005 11:35, Paolo Cilmo wrote:
 I need to develop a site
 using ZMI (Zope2 typical using) and especially i want
 to develop this applications:

We do not support TTW development.

 1- I've a package with a class and into the class a
 method
 2- with browser:addMenuItem in zcml i can insert a
 package into zmi from add menu
 3- I've a Page Template into ZMI
 ASK: how i call from the Page Template the script,
 passig parameters and to have a response from script?

Why do you need to have this Page Template in ZMI? Why not on the file system?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Validation of schemas?

2005-10-30 Thread Stephan Richter
On Sunday 30 October 2005 04:45, Adam Summers wrote:
     How do I implement a validation rule that says either email or phone
 have to exist, but not necissarily both.

You do that using invariants. Look at zope.interface/README.txt for details.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Help us! Calling a Python Script from ZPT

2005-10-30 Thread Stephan Richter
On Saturday 29 October 2005 20:50, Wade Leftwich wrote:
 Stephan Richter wrote:
  On Saturday 29 October 2005 11:35, Paolo Cilmo wrote:
 I need to develop a site
 using ZMI (Zope2 typical using) and especially i want
 to develop this applications:
 
  We do not support TTW development.
 
 1- I've a package with a class and into the class a
 method
 2- with browser:addMenuItem in zcml i can insert a
 package into zmi from add menu
 3- I've a Page Template into ZMI
 ASK: how i call from the Page Template the script,
 passig parameters and to have a response from script?
 
  Why do you need to have this Page Template in ZMI? Why not on the file
  system?

 I'm working on an application where Page Templates belong in the ZMI, at
 least I think so. The content being displayed is a business directory,
 with suppliers, products, and categories for those products. We will be
 implementing 50 different directories, with the same basic content
 structure but very different designs. Each of those directories will use
 5 or 6 page templates, which go in the ZMI.

Why not have those templates on the file system? Is there a need for users to 
modify those templates?

 It seems like this is a common pattern for content management applications.

Maybe, I don't know.

 Repeating my own posting from 10/9, here's how I made an adapter
 to use a file system view with a ZMI template:

Again, we do not support TTW development. If you do such experiments that's 
great, but you cannot expect much help.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] namespaces.zope.org doesn't resolve

2005-11-02 Thread Stephan Richter
On Wednesday 02 November 2005 17:43, Brad Allen wrote:
 Most of the zcml configuration files I've seen contain
 xmlns=http://namespaces.zope.org/zope;. I wanted to read about what
 was in that namespace, so I tried to load that page in a web browser.
 This name just doesn't seem to resolve in DNS.  I guess my ignorance
 about XML is showing here. Where do I find the actual namespace?

Namespaces only have to be URIs. They do not have to represent URIs with some 
content. You can find an overview of all ZCML namespaces and elements in the 
apidoc: http://localhost:8080/++apidoc++

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Executing utility specific code on server startup

2005-11-12 Thread Stephan Richter
On Saturday 22 October 2005 13:01, Chris Lehmann wrote:
 I have a utility that needs to start several threads when zope starts
 up.  What is the best way to accomplish this?

 So far I have tried to use the IDatabaseOpenedWithRoot and
 IProcessStarting events but when I try and register them with the
 following code, my handlers do not get called.  Code from the
 constructor of my utility class:

 zapi.getGlobalSiteManager().subscribe([IProcessStartingEvent],None,
 self.onStartup)

 What am I doing wrong?

You need to make this registration using ZCML. Having this code in the utility 
constructor is far too late.

subscriber
for=...IProcessStartingEvent
handler=...onStartup /

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How is sending a HTTP POST in Zope3 supposed to work ?

2005-11-12 Thread Stephan Richter
On Thursday 27 October 2005 05:44, Michael Haubenwallner wrote:
 osting to the object itself equals a GET request.
 Posting to the @@edit.html view of the object results in a
    UserError: The character set specified in the content type
 ($charset) does not match file content.
 error, even with charset set in the request headers.

How does your request look like? Note that we use POST in the edit form, so 
things should be fine. If this is not working for you, I would write a custom 
view maybe.

 Are there any functional tests existing for the HTTP POST method ?

I doubt it, but it would be nice, if you could write one.

 Aside: how would i create a default view for a POST request for a
 certain object ?

See the SchoolTool REST interface. It does all those type of things. The tinyu 
bit longer answer is: Develop a view class that implements a method called 
POST and then register this method as a view for IHTTPRequest.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] at sea with basic setup

2005-11-12 Thread Stephan Richter
On Friday 04 November 2005 22:32, Ross Boylan wrote:
 I'd like to create some users, set authentication methods, and so on.
 After a lot of fooling around with the GUI and looking at various
 docs, I conclude I have no idea what's going on.

Tim suggested reading the books and he is right. I'll note that the online 
version is outdated and has some issues that were resolved in the paper copy 
of my book.

 To complicate matters, there were some issue with my installation on
 Debian (using the package in testing) so that some of the products
 aren't available.  I wonder if any of them are key to getting things
 going.

SVN trunk. :-)

 Do I need to create something like a Zope 2 user folder?

Yes, but it is called an authentication utility.

 Are all users defined in the principals file on disk?

No.

 I tried installing a Site Manager object.  The Site Management screen
 shows a lot of entries (e.g., Authenticator Plugin) that say there are
 no entries available yet.  I installed some objects that seemed
 related, gave them names, and tried to hook them up with this screen.
 The only thing that seems to have worked is the unique id tool.

As Tim also pointed out, read the zope.app.authentication *.txt files.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] sqlos, sites and local utilities

2005-11-12 Thread Stephan Richter
On Tuesday 08 November 2005 05:38, Andreas Elvers wrote:
 Hi,

 sorry for asking it here but sqlos mailing list seems dead.

 Has anyone yet tried sqlos with database connections created as local
 utilities ? At one point sqlos tries to get the utility in connection.py
 Line 88.

   newconn = zapi.queryUtility(IZopeDatabaseAdapter, name,
  default=None,
  context=context)

 The context points to a sqlobject instance. The problem is that these
 instances seem to have no parent and thus will fail the lookup my local
 utility and will raise an 'NoneType' object is not callable error later
 in the code when trying to adapt.

 When you try the sqlos example everything is fine, since the database
 connection is defined in configure.zcml as a global utility.

 My current idea is to expose the enclosing folder as a context to query
 utility. But I don't know if setting references in sqlobject instances
 is such a great idea.

If the sqlobject instance does not have a parent, then that's bad. It probably 
does not have a parent, because it is usually wrapped using a location proxy, 
which is lost inside a method. I think the smart thing to do here would be 
what you suggested or to write a subclass of sqlobject that implements 
ILocation.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] configure.zcml entries for using adapters.

2005-11-12 Thread Stephan Richter
On Thursday 10 November 2005 19:55, John Smith wrote:
 I then created a nice page template which contains
 this snippet:

 div tal:content=python:context.getTotalDistance()
 /

 where context is the Car object.

This is wrong, because Car does not have a function called getTotalDistance. 
In the view class do:

class View:

  def getTotalDistance(self):
total = interfaces.IDistanceTotal(self.context)
return total.getTotalDistance()

In the view do:

  div tal:content=view/getTotalDistance /

Note that you should never ever put a python call into your template.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Complex Adapter Requirements - Named Adapters?

2005-11-12 Thread Stephan Richter
On Sunday 30 October 2005 14:16, James Allwyn wrote:
 One thought I had, was creating an interface IStandard, with
 attributes like meetsstandard and nameofstandard, and then
 subclass this, e.g. to IAccreditationScheme and INationalCode (where
 Accreditation Scheme and National Code are the names of two of the
 standards). But I get a little stuck conceptually at the point where I
 try to handle, for example, the fact that for some ISharedHouse
 objects, IAccreditationScheme would be suitable, whilst for others it
 wouldn't, because of their location. In fact it's likely that in the
 future we will need to recognise two or more standards for a
 particular accommodation type (so IAccreditationScheme and IHouseCheck
 chould both apply to ISharedHouse objects, in differect areas).

This is not such a complex case as you think.

If you register an adapter from ISharedHouse to IAccreditationScheme then it 
will be only available for this interface and not for IAccommodation in 
general. I would even write a specific IAccreditationScheme for every scheme 
you support; thus you do not even need named adapters.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Compatibility

2005-11-22 Thread Stephan Richter
On Tuesday 22 November 2005 19:34, Milind Khadilkar wrote:
 Is it correct to say that one of the major objectives of Zope 3  as opposed
 to zope-x ( viz. compatibility with Zope 2, or at least an easy way for
 importing products from zope 2) has not been achieved? The 'x' was removed
 on grounds of being ready for production use, not on grounds of
 compatibility. The release announcement for 3.1 also mentions continuing
 efforts to ease transition from zope 2 to zope 3. Is it meant to be the
 same as ability to import products?

My opinion is that you will never be able to import your Zope 2 product as a 
packge in plain Zope 3. HAving said that, there are continuous efforts, such 
as Five and Goldegg, to bring Zope 3 technology into Zope 2. 

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] template unparsed

2005-11-22 Thread Stephan Richter
On Tuesday 22 November 2005 06:49, Antonio Beamud Montero wrote:
 What can be the problem...?

You need to provide us with much more information, such as the contact 
implementation, the content of contact.pt, etc.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need guidance

2005-11-30 Thread Stephan Richter
On Tuesday 29 November 2005 17:45, Brad Allen wrote:
 Another question about ZODB is whether to use it to store page
 templates. If I build a lot of ZPT pages and macros and store them
 through the ZMI, and then later want to rearrange the folder
 structure, I'm guessing it will be a pain to change a lot of
 hard-coded path references. If I use text files outside the ZODB,
 then I can use a host of text editor tools for searching across
 multiple files.

 I like the idea of letting end users have something like the ZMI for
 editing content, and am hoping it will be possible avoid putting much
 TAL and METAL markup in documents in the ZMI, but rather have the .pt
 files pull content from the ZODB. However, it's not clear to me how
 to make that work. The examples in the books have the .pt files in
 the filesystem; I don't recall seeing any the ZMI/ZODB.

We are currently not supporting TTW development. Thus, in Zope 3 you cannot 
develop templates TTW well yet.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need guidance

2005-11-30 Thread Stephan Richter
On Tuesday 29 November 2005 17:45, Brad Allen wrote:
 Here is another question. Suppose I'm working with a team of
 developers. Should we each set up our own separate Zope3 instance,
 and do SVN checkouts into our own separate, local /lib/python
 directories inside the instance? How then would we merge any changes
 done in the ZODB? On the other hand, having all team members try to
 share a single Zope 3 instance seems unworkable...

Yep, SVN is the way to go; we do this in Zope 3 projects all the time. Since 
no code lives in the ZODB, there is no need for sharing ZODB content.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] list archives for zope3-users

2005-11-30 Thread Stephan Richter
On Wednesday 30 November 2005 13:41, Brad Allen wrote:
 If anyone else has thoughts on the best way to search the mailing
 list archives, I'd appreciate hearing about it. I'd prefer to avoid
 asking questions that others have already asked.

I use google. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3, sqlos and workflow

2005-12-05 Thread Stephan Richter
On Saturday 03 December 2005 05:27, Markus Leist wrote:
 is there any possibility of storing attributes- AND workflow-data
 of an (Zope3-)Instance in a SQL-Database (via sqlos)?

 If not, I have to connect the object attributes to SQL and the object
 workflow instance to ZODB - a good (scalable) solution?

 Any idea or URL is welcome.

Short answer: You need to create your own pickles. You can probably reuse the 
ZODB machinery for it though.

Long answer: You probably want to implement an alternative annotation 
mechanism, like SQLOSAnnotatable that uses the above method.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Help with building Zope3

2005-12-10 Thread Stephan Richter
On Saturday 10 December 2005 04:20, John Poltorak wrote:
 Is this the right list to ask about problems encountered in building
 Zope3?

yep.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Newcomer to Zope, question about Postgres

2005-12-10 Thread Stephan Richter
On Saturday 10 December 2005 01:10, Rakesh Malik wrote:
 I have a working instance of Zope3 in Fedora, and I downloaded and built
 the psycopg adapter. I'm still getting errors when I try importing
 SQLObject, though. Is this a configuration thing, or did I neglect to
 download and install
 something I need to make this work?

Without a more specific description of the software used, the specific error 
and your configuration, there is no way we can help you.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Newcomer to Zope, question about Postgres

2005-12-13 Thread Stephan Richter
On Tuesday 13 December 2005 08:07, Andreas Elvers wrote:
  I have a working instance of Zope3 in Fedora, and I downloaded and built
  the psycopg adapter. I'm still getting errors when I try importing
  SQLObject, though. Is this a configuration thing, or did I neglect to
  download and install
  something I need to make this work?

Zope is not affiliated with SQLObject. You have to install it separately, if 
you want to use sqlos or other technologies depending on it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Catalog for newbies

2005-12-13 Thread Stephan Richter
On Thursday 08 December 2005 10:56, Frank Burkhardt wrote:
 How do I use adapters in python? I've got an object implementing interface
 'IFoo'. How to I turn it into an object implementing 'IBar'?

Pretty much all introductory documentation for Zope 3 will talk about this, 
including the txt files in zope.interface and zope.component.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] logout feature with zope3

2005-12-13 Thread Stephan Richter
On Wednesday 07 December 2005 00:40, Jing Song wrote:
     But I'm having another trouble. We use ldap authentication to store the
  user information.  How could that work with cookies to do login and
  logout?  ls there any example or reference materials available? I am
  pretty new in this area, any information will be very much helpful.

You really want to checkout the pluggable authentication utility in 
zope.app.authentication. There is also an ldap adapter package in the 
repository to connect to LDAP. And there should also be a working blugin for 
the pluggable authentication utility that uses LDAP.

http://svn.zope.org/ldapadapter/trunk/
http://svn.zope.org/ldappas/trunk/

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Fwd: [Zope3-Users] Problems building Zope3

2005-12-13 Thread Stephan Richter
I am forwarding this message to the zpkgtools mailing list, since this is not 
a pure Zope 3 problem. Since I am not a Windows user, I cannot answer the 
question.

Regards,
Stephan

--  Forwarded Message  --

Subject: [Zope3-Users] Problems building Zope3
Date: Tuesday 06 December 2005 04:21
From: John Poltorak [EMAIL PROTECTED]
To: Zope3-users@zope.org

Can anyone tell me what may have gone wrong here?

/usr/bin/python.exe install.py -q build
Traceback (most recent call last):
  File install.py, line 28, in ?
context.initialize()
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 83,
in initialize
self.scan(self._pkgname, pkgdir, self._pkgname)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 193,
in scan
self.scan_collection(name, directory, reldir)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/setup.py, line 197,
in scan_collection
pkginfo = package.loadCollectionInfo(directory, reldir)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.py, line
120, in loadCollectionInfo
pkginfo = read_package_info(directory, reldir)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.py, line
153, in read_package_info
pkginfo, _ = cfgparser.loadConfigFile(get_schema(), f, url)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/cfgparser.py, line
52, in loadSchemaCache
schema = loader_factory().loadURL(path)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 63,
in loadURL
r = self.openResource(url)
  File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 102,
in openResource
self._raise_open_error(url, str(e))
  File G:/ux2bs/workdir/Zope-3.1.0/Support/ZConfig/loader.py, line 114,
in _raise_open_error
url)
ZConfig.ConfigurationError: error opening file
//G:/ux2bs/workdir/Zope-3.1.0/Support/zpkgsetup/package.xml: [Errno ftp
error] no host given
make: *** [build] Error 1


Does this mean I need to specify hostname before building Zope3 ?


--
John



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

---

-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Permission required for renaming?

2005-12-13 Thread Stephan Richter
On Wednesday 30 November 2005 16:16, Alec Munro wrote:
 My users are unable to rename things, seemingly everywhere. They can
 add, remove, but not rename, or cut/copy. I'm not sure how to set the
 permission for this.

I think we need some more specific background information to help you out 
here. For example: Are those local or global users? Is this a specific 
container, or is it also true for a folder? ...

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Denying permissions for 'everybody' - which principals to use?

2005-12-13 Thread Stephan Richter
On Wednesday 16 November 2005 15:38, Jeff Shell wrote:
 Am I denying the right person here? Globally, the permission is set up
 as follows:

                        {'permission': 'zope.View',
                         'role': 'zope.Anonymous',
                         'setting': PermissionSetting: Allow},

 Should I Deny access to the zope.Anonymous role?

Yeah, you need to deny all permissions to anonymous. Note that then anonymous 
cannot see any pages whatsoever, which is probably what you want.

 To the Everybody group?

no, that's not necessary.

 To the Unauthenticated Group?

You could do that, if you like.

 Right now, I only deny the  principal:

     def denyUnauthenticated(self):
          Explicitly deny the view permissions for unauthenticated users.
  anybody = zapi.getUtility(IUnauthenticatedPrincipal).id
         pmanager = IPrincipalPermissionManager(self.context)
         for permission in self._view_permissions:
             pmanager.denyPermissionToPrincipal(permission, anybody)

mmh, that should work though.

 The point of this simple 'sharing' interface is to let our customer
 have a press folder that they can restrict access to by allowing only
 limited people in to it. We're trying to keep the user interface as
 simple as possible.

Yep, that's a noble/good goal. :-)

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] What do I need to play with Zope 3 on Windows, offline?

2005-12-21 Thread Stephan Richter
On Wednesday 21 December 2005 18:00, Chris Withers wrote:
 - up-to-date checkout (but of what branch?!)

 - some binary downloads (but of what, is there a recent, full, binary
 release I can just download?)

trunk + Tim's DLLs

or

3.2 beta 1

 - any updated docs? What else do I need to cover the stuff that's
 changed since the dead tree versions of Philipp and Stefan's books came
 out? (particularly stuff that's gonna trip me up when I'm trying to get
 going as a total n00b)

Most of the changes are well documented in the *.txt files (most of them 
compiled in the apidoc book) and apidoc.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: ZCML, practicality, purity (was Excellent perspective...)

2005-12-22 Thread Stephan Richter
On Thursday 22 December 2005 09:23, Martin Aspeli wrote:
  So it's very refreshing to see Zope 3 without ZCML.  I hope the trend
  continues.

 I think Philipp makes what in my limited understanding is a very good  
 point here:

 http://www.z3lab.org/sections/blogs/philipp-weitershausen/2005_12_14_zcml-n
eeds-to-do-less

As said before, this idea was first expressed by Jim over a year ago, and we 
have been moving towards this model ever since.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: ZCML, practicality, purity (was Excellent perspective...)

2005-12-23 Thread Stephan Richter
On Thursday 22 December 2005 18:48, Jeff Shell wrote:
 Other problems that I've had with Python based configuration in the
 past has involved not knowing when to do the configuration. Do I want
 to register the class I just defined in the module code?

 class Foo(...):
     pass
 registerAsFooable(Foo)

Right, this is what twisted does and it makes it very hard to see what 
components are available and where they come from. It also makes it 
practically impossible to override components without getting into the 
ordering mess you mentioned.

I also note that the code browser now supports looking at ZCML files. Not only 
will it highlight the code for you, but also provide links to specified 
components. I think this might be very helpful for people to discover the 
system. ZCML is a great way of getting a quick overview on how things hang 
together.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3.2.0 beta 2 released!

2005-12-25 Thread Stephan Richter
The Zope 3 development team is proud to announce Zope 3.2.0 beta 2.

Zope 3 is the next major Zope release and has been written from scratch based
on the latest software design patterns and the experiences of Zope 2.

It is our opinion that Zope 3 is more than ready for production use,
which is why we decided to drop the 'X' for experimental from the name. We
will also continue to work on making the transition between Zope 2 and Zope 3
as smooth as possible. As a first step, Zope 2.8 includes Zope 3 features in
the form of Five.  This is a long term effort. We're not there yet.
**You can't run Zope 2 applications in Zope 3.**


Downloads

  http://zope.org/Products/Zope3

  Installation instructions for both Windows and Un*x/Linux are now available
  in the top level 'README.txt' file of the distribution. The binary installer
  is recommended for Windows.

  Zope 3.2 requires Python 2.4.2 to run. You must also have zlib
  installed on your system.

Most Important Changes Since 3.2b1

New features

  - Added an option to mkzopeinstance to create instances that use
ZServer, rather than Twisted.

  - Changed the way returning large results is
handled. Applications can now simply return files to the
publisher.

Bug Fixes

  - Added input buffering to the twisted integration  

  - Fixed the plumbing in ZServer so that attempts to return large
output efficiently using iterators can actually succeed.

  For a complete list of changes see the 'CHANGES.txt' file.


Resources

  - Zope 3 Development Web Site:http://dev.zope.org/Zope3

  - Zope 3 Dev Mailing List:http://mail.zope.org/mailman/listinfo/zope3-dev

  - Zope 3 Users Mailing 
List:http://mail.zope.org/mailman/listinfo/zope3-users

  - IRC Channel: #zope3-dev at irc.freenode.net


Acknowledgments

  Thanks goes to everyone that contributed.

Enjoy!

The Zope 3 Development Team
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] problem Z3+cpsskins

2006-01-03 Thread Stephan Richter
On Saturday 31 December 2005 18:58, Hector Miuler Malpica Gallegos wrote:
 Hi friends, i have a problem actually use cpsskins of svn.z3lab.org
 and the zope3 of svn (svn.zope.org), whenever I want to create a
 subject shows the following error:

You might have more luck asking on the z3-labs mailing list, since Jean-Marc 
is more active there.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] SQLObject and SQLOS question

2006-01-03 Thread Stephan Richter
On Tuesday 03 January 2006 05:45, Roman Susi wrote:
 Now it looks like I need SQLOS (do I need it to my goal???)...

Well, sqlos is one approach. It provides a nice layer that connects SQLObject 
and Zope 3.

 And I am 
 at loss how to install in. Yes, I have read http://codespeak.net/z3/sqlos/
 but it was not useful, because it doesn have INSTALL instructions.
 The tgz doesnt have neither setup.py nor configure! Maybe I have not
 found proper manual...

 Can anybody help me please?

I don't know about sqlos, but packages are usually installed anywhere in the 
Python path. For example, if you have the SVN checkout, you should simply put 
http://codespeak.net/svn/z3/sqlos/trunk/src/sqlos/ into the Zope3/src 
directory and copy all files in 
http://codespeak.net/svn/z3/sqlos/trunk/includes/ intp Zope3/package-includes

 One more question: is the above mentioned approach STABLE at all
 compared to totally ZODB or conventional usage of relational DB in Zope?
 Version 0.1 of sqlos is not reassuring...

This version of sqlos is used in production in a fairly large installation, so 
I think it is a pretty stable solution in that sense. On the other hand, not 
many people use sqlos, so it might not be as supported as you wish it would 
be.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How hidden ZMI

2006-01-03 Thread Stephan Richter
On Wednesday 28 December 2005 04:10, 张平 wrote:
 I am newbie of zope, have installed zope3. I just want develop a web site
 use zope, not wanna dive into zope itself development. But when I add a
 bugtrack with the name of bugtrack, and visit it, the content of
 http://zope.host:8080/bugtrack include ZMI, how can I hidden them.

You can't. But you can avoid showing it by making the bugtracker skin the 
default skin. Another option would be, of course, to develop your own skin 
from scratch.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Which packages to remove from etc/package-includes

2006-01-03 Thread Stephan Richter
On Sunday 25 December 2005 06:51, Douglas Douglas wrote:
 Is this issue important or there's no real difference in how many packages
 get included on start?

You are right, the fewer ZCML files you read, the faster it starts. First of 
all, to have a more minimal set of files read, use the release, since it 
excludes several packages. If you do not need/want the developer's mode, then 
you can simply turn it off in zope.conf (saves 1 sec in starttime on my 
computer). After that you are on your own. I would simply remove one file at 
a time and see what happens (in fact, renaming the file prefix is 
sufficient).

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Confused re Fine Distinction btw a View and a Page

2006-01-03 Thread Stephan Richter
On Wednesday 07 December 2005 07:01, Jeff Rush wrote:
 I'm trying to understand how a sequence of pages is handled, as one
 example the IAdding (+) view.

 I'm running into the TAL use of the terminology:

  @@standard_macros/page
 versus
  @@standard_macros/view

 Both of those have much of the Zope interface look, just that /page
 drops the tabbar (I wish there were an easy way to drop the tree and
 login name from /page too).

To understand this properly, look at zope.app.basicskin.standardmacros. You 
can see that view and page are both really the page macro. However, ZPT 
stores the actual macro name in a variable macroname. You can then say, 
okay, if the macro page was requested, then I do not want to show the 
available views, context menus, etc. The usage of this feature can be seen in 
zope.app.rotterdam/template.pt


 But then in CMF, seemingly using view/page to mean something else, I have:

  browser:pages
 versus
  browser:view

 And in the source, we have:

Named View w/o Pages

Unnamed View w/Pages

Named View w/Pages

First of all, I think you meant to s/CMF/ZCML. Next, ZCML has **nothing** to 
do with TAL. In ZCML, browser:page and browser:view are ways to register 
new browser views. I agree that their existence is convoluted, as 
browser:pages duplicates a lot of the browser:view use cases. If you use 
browser:view, with pages, then you can do the following traversal:

context/view1/page1.html
context/view2/page2.html

If you use browser:pages, then you can only do:

context/page1.html
cotnext/page2.html

 Obviously a page and a view are not the same thing, but something
 hierarchical.  But is such a page still a view component or some
 appendage of a view?

 For adding items:
 +/index.html
 +/action.html

 Those are two real browser-pages, one for displaying the form to be
 filled in, and one for accepting that form and actually creating the
 item.  And some benefit or sharing of data occurs by making those pages
 'subviews' of the '+' view but I'm not sure what that benefit is, other
 than sharing a few ZCML directives.

Well, we do not clutter the container namespace. Consider this. Let's take 
your suggestion and let's implement, adding-index.html and 
adding-action.html. The you could use:

container/@@adding-index.html
container/@@adding-action.html

There are two disadvantages:

(a) You always have to use @@, since the container could have objects called 
adding-*.html.

(b) You have to use more English and it is not as obvious that those two views 
belong together.

 And last, in such a sequence of pages, there must be a way to control
 the final destination or page displayed after creating that instance.
 One Zope 3 book mentions providing a nextURL() method on the view, but
 in the case of '+' that would require subclassing.  Is there a less
 intrusive way?

Subclassing is fine in this case. You could write your own IAdding 
implementation that looks up an adapter for the nextURL call, but I think 
that would be an overkill.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] My principals not being found by PrincipalRegistry

2006-01-03 Thread Stephan Richter
On Wednesday 30 November 2005 15:11, Alec Munro wrote:
 Specifically, this relates to the undo page.

 I have my own class of principal folder, as well as several classes of
 principals. These work for login, but when looking at the undo page, I
 get not available.

 Is there something I manually have to do in order to get my principals
 to be available in the PrincipalRegistry, or have I screwed up
 somewhere else?

This seems strange to me. As long as you implemented all the interfaces 
correctly (specifically getting the principal's complete id), there should be 
nothing else required. I suggest looking into the undo code, make some PDB 
breakpoints and see where you loose the information.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] (Ab)using utilities

2006-01-03 Thread Stephan Richter
On Tuesday 29 November 2005 18:16, Thomas Lotze wrote:
 Our current solution is to register utilities that handle type two and
 three items, and turn them into folders actually containing the items
 while we're at it. This does provide uniqueness of the type two and three
 item containers, as well as well-defined access by an interface name.
 However, I'm not at all sure that containing application data is what
 utilities are meant for. Is it?

 I get a feeling that we might want folders as attributes of the top-level
 container, for all the uniqueness and well-defined access that provides.
 But would that be Zope-3-ish?

There are several approaches:

(1) Use the catalog. I bet you can find a way to create an index by class name 
or by the content type interface.

(2) Write a special folder that keeps track of all ids of type A, B, C... This 
is the cheap way of getting a catalog-like feature.

(3) a derivation of (2) would be to write adapters that store the ids of type 
A, B, C in annotations. Use event subscribers to update the annotations.

Overall, I agree with you that utilities are not meant to solve this type of 
problem for the reasons you listed yourself.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] unauthenticated principal

2006-01-03 Thread Stephan Richter
On Sunday 27 November 2005 12:57, Florian Lindner wrote:
 my error log has a entry to a unauthenticated principal:

 unauthenticated, pre1, CS.User, beschreibung

 but why is there a username (pre1) being print? What does the
 unauthenticated means in that context?

I have no clue. :-) Zope 3 has the concept of an unauthenticated user. This 
user can have as many roles or permission granted as you wish. Why the system 
thinks that pre1 is an unauthenticated user, beats me. BTW, where is that log 
entry coming from?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Add menu

2006-01-03 Thread Stephan Richter
On Wednesday 16 November 2005 06:31, [EMAIL PROTECTED] wrote:
 We're a little at loss because the Add menu disappeared from the pages,
 though, and we can't make out the logic behind its behaviour.

Can you access the adding view manually?

mycontainer/+/index.html

If not, you need to register the adding views yourself, of course. I bet you 
then the add menu will reappear.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Renaming folder causes NotFoundError

2006-01-03 Thread Stephan Richter
On Monday 14 November 2005 16:00, John Smith wrote:
 Anyhow, I tried to rename the folder to something more
 descriptive, and Zope3 keeps coming up with the There
 has been a system error page, and on the terminal it
 say s NotFoundError, 'myfolder'.

Sorry, that you had to wait that long for an answer, but does this error still 
occur in Zope 3.2b3?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux

2006-01-05 Thread Stephan Richter
On Thursday 05 January 2006 06:10, Marco Groppo wrote:
 Il giorno mer, 04/01/2006 alle 19.07 -0500, Jim Fulton ha scritto:
  Did you have the problem with beta 2?

 Sorry, I'm an idiot. Yesterday I didn't read the access log, so I didn't
 notice that the problem was Firefox... The problem was due to a Firefox
 extension (FasterFox) which I installed sometime ago (I had even
 forgotten of its existence...). This extension periodically downloads
 all static pages linked by the current page; since the names of the
 views usually finish in .html it thinks that they are static
 pages :-( and when the browser loads the ZMI page it gets in background
 /@@find.html, /@@grant.html,... and of course: /@@undo.html!
 I'm really sorry, I should have read the log yesterday :-(
 (the reason why I didn't notice this problem with previous versions is
 that probably I didn't have FasterFox enabled...)

Darn, this is a dangerous feature. Sigh.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to render PageTemplate manually?

2006-01-05 Thread Stephan Richter
On Wednesday 04 January 2006 07:55, Łukasz Łakomy wrote:
 Create content type 'Portlet' that could have TAL as its content and when
 watched in browser TAL should be redered. My code is below.

You really should not call this a portlet. A portlet is very well defined by 
JSR 168. Note that the Zope community -- specifically CMF and Plone -- have 
misused the term for a long time.

 class PortletView:
     def renderText(self):
         portlet = IPortlet(self.context)
         format = portlet.format
         if format in ('HTML', 'Plain'):
             return portlet.getText()
         elif format == 'Structured':
             struct = structurize(portlet.getText())
             doc = DocumentWithImages()(struct)
             output = HTMLWithImages()(doc, level=1)
             return output
         elif format == 'Page Template':
             page_template = PageTemplate()
             page_template.write(portlet.getText())
             output = page_template()
             return output

 But there is a problem. When I define a variable in template and call it
 its ok. But I cannot call 'context' variable (for example div
 tal:content=context/title/). This is my traceback.

Well, of course this does not work. The ``PageTemplate`` class does not know 
magically about a context. Have a look at 
zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile to see what 
is involved in making variables available.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Permissions of a given object

2006-01-12 Thread Stephan Richter
On Thursday 12 January 2006 07:01, Frank Burkhardt wrote:
  for obj in catalog.searchResults(content=searchquery):
     view=zapi.queryMultiAdapter((obj,self.request),name='view.html')
     try:
        canAccess(view,'__call__')
        search_results.append(obj)
     except:
        object inaccessible

 But canAccess never fails here - even if the object is inaccessible.

canAccess() returns a boolean unless there is no security declaration at all.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Radius Server

2006-01-12 Thread Stephan Richter
On Thursday 12 January 2006 12:01, David Johnson wrote:
 Does anyone use Zope as an authentication server? Specifically for Radius
 clients?

In Zope 3 not that I am aware of. Until the 3.2 release it was not easy to add 
new network protocols to Zope. Now that we are using twisted this might be 
easier. Maybe there is already a twisted Radius server Module you could use?

 Are there products out there for this? I see Radius client 
 packages.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Eric3 unit tests and debugger?

2006-01-14 Thread Stephan Richter
On Thursday 05 January 2006 08:50, Jim Washington wrote:
 I like the Eric3 python IDE. http://www.die-offenbachs.de/detlev/eric3.html

 I've been using it for a while, mainly for file organization and its SVN
 and Bicycle Repair Man integration.  It claims support for unit testing
 and debugging, but the setup for those seems to be more oriented toward
 full PyQt applications than packages within another framework.  Has
 anyone tried to get those working for z3 project development?

I only know about Wing IDE (which is pretty nice) and it supports life Zope 3 
debugging (one thread).

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] macros from ZPT

2006-01-16 Thread Stephan Richter
On Monday 16 January 2006 09:39, John Smith wrote:
 Does anyone know if it is possible to access macros
 defined in a TTW ZPT from a file-system based view
 class?

 In a TTW folder, I have added a ZPT and edited it to
 contain a page macro.

No, it is not possible, since the ZPT scripts in the ZODB are not views, but 
objects themselves.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


  1   2   3   4   5   6   7   >