Re: [Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-06 Thread TAHARA Yusei
Hi.

I think you should use zope.app.testing.ztapi.provideAdapter instead.

See zope/app/form/browser/tests/test_objectwidget.py,
this is a good example.

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


[Zope3-Users] Re: Registering adapter for ListSequence widget in tests

2006-09-06 Thread Philipp von Weitershausen

TAHARA Yusei wrote:

I think you should use zope.app.testing.ztapi.provideAdapter instead.


No! ztapi.provideAdapter is discouraged. zope.component.provideAdapter 
is the recommended spelling.


Philipp

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


Re: [Zope3-Users] Re: Registering adapter for ListSequence widget in tests

2006-09-06 Thread TAHARA Yusei
At Wed, 06 Sep 2006 09:29:15 +0200,
Philipp von Weitershausen wrote:
 
 TAHARA Yusei wrote:
  I think you should use zope.app.testing.ztapi.provideAdapter instead.
 
 No! ztapi.provideAdapter is discouraged. zope.component.provideAdapter 
 is the recommended spelling.

Oh, sorry. I did not know that...

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


Re: [Zope3-Users] Re: Registering adapter for ListSequence widget in tests

2006-09-06 Thread Philipp von Weitershausen

TAHARA Yusei wrote:

At Wed, 06 Sep 2006 09:29:15 +0200,
Philipp von Weitershausen wrote:

TAHARA Yusei wrote:

I think you should use zope.app.testing.ztapi.provideAdapter instead.
No! ztapi.provideAdapter is discouraged. zope.component.provideAdapter 
is the recommended spelling.


Oh, sorry. I did not know that...


You couldn't have. It's not officially deprecated. It's just discouraged.
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Registering adapter for ListSequence widget in tests

2006-09-06 Thread Darryl Cousins
Ok. Thanks Tahara and Philipp. I am using component.provideAdapter.

What I am having trouble with is registering ListSequenceWidget for use
in a doctest.

I believe the matching zcml from zope.form.browser configure is:

view
type=zope.publisher.interfaces.browser.IBrowserRequest
for=zope.schema.interfaces.IList
 zope.schema.interfaces.IField
provides=zope.app.form.interfaces.IInputWidget
factory=.ListSequenceWidget
permission=zope.Public
/

My own attempt to register the widget for a doctest is:


 zope.component.provideAdapter(ListSequenceWidget, \
...   [IList, IField, IBrowserRequest], \
...IInputWidget)

The error on running doctest is:

ComponentLookupError: ((zope.schema._field.List object at
0xb704532c,
zope.publisher.browser.TestRequest instance URL=http://127.0.0.1),
InterfaceClass zope.app.form.interfaces.IInputWidget, u'')

The relavant part of the schema to be rendered is:

addlanguage = List(
title = _(Language),
description = _(Add language to content),
required = False,
default = [],
value_type = TextLine(
title = _(Langauge)))

Thanks,
Darryl


On Wed, 2006-09-06 at 09:41 +0200, Philipp von Weitershausen wrote:
 TAHARA Yusei wrote:
  At Wed, 06 Sep 2006 09:29:15 +0200,
  Philipp von Weitershausen wrote:
  TAHARA Yusei wrote:
  I think you should use zope.app.testing.ztapi.provideAdapter instead.
  No! ztapi.provideAdapter is discouraged. zope.component.provideAdapter 
  is the recommended spelling.
  
  Oh, sorry. I did not know that...
 
 You couldn't have. It's not officially deprecated. It's just discouraged.
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users

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


[Zope3-Users] need help on

2006-09-06 Thread Denis Shaposhnikov
Hi!

I'm thinking on how to use Zope3 for my task and need some help. I
have a web application which have different look for different
users. Every user need to authenticate and have a some type like an
Administrator, Operator, SomeManager, Just-A-User and so on. For
example my webapp have an URL like `http://server/mywebapp/`. So,
after authentication every user see `http://server/mywebapp/`
according his type.

Could you give me advice or start point how to implement such behaviour
in Zope3? The simplest way as I see is use different skins? But how to
dynamically change the skin to user's type?

Thanks!

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Changing object type in Object field.

2006-09-06 Thread Stephan Richter
On Tuesday 04 July 2006 05:58, [EMAIL PROTECTED] wrote:
 *First question*: is this design (delegation to subobject implementing
 specific interface) reasonable, or in Zope I should do that other way?

Yes.

 *Second question*: Can object implementing IDueDateDecider (inherited from
 IDecider) be used in decider field (which has specified schema=IDecider)?
 How to ensure that proper schema (i.e IDueDateDecider instead of IDecider)
 will be displayed in ObjectWidget?

Well, you would need to write a specialized interface for IMyObject, such as 
IMyDueDateDecisionObject.

 *Third question*: What way would you suggest to allow web user dynamically
 'switch' decider object in MyObject (i.e change a kind of decision, for
 example from IInactivityDecider to IDueDateDecider) - preferably using
 formlib-based view?

Sure. formlib works. You just have to implement a mechanism for adding 
different IDecider objects. In the ZMI this is a common use case. So 
basically what you want is a set of IDeciderFactory obejcts that are 
registered as utilities. You then select which factory you want to use. The 
factory can also provide the schema to use for the form.

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 3 as WSGI app using mod_python

2006-09-06 Thread Stephan Richter
On Saturday 08 July 2006 06:06, Achim Domma wrote:
 Could somebody tell me what the status of this stuff is? Is it just an
 experiment which might be dropped in the future? Has somebody
 experiences to share?

Well, first of all, we are totally committed to WSGI, so this support will not 
go away. I would also not consider it experimental anymore, sicne WSGI is now 
our main API between server and application.

As for the modzope code you have found, I am not sure. Philipp Weitershausen 
implemented this module and I have not used it. But he worked on it a lot, so 
it is definitely beyond initial exploration. But you should ask Philipp.

In general people are not that interested in this option and you will have 
trouble finding 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] NEWBIE: Using Pluggable Auth in Zope 3

2006-09-06 Thread Stephan Richter
On Wednesday 12 July 2006 03:30, Nick Howden wrote:
 However, I appear to be stumbling at the very first block of how to
 initialise my zope3 product using ZCML to include the pluggable auth
 modules. Is there a document anywhere that will guide me through the
 process (I've read the app.authenticate.README any although it was useful
 for writing the plugins I still don't know how to use them!)

ZCML, until z3c.baseregistry came around this weekend, was not able to 
configure local sites. zope.app.authentication is mainly written as local, 
persistent components.

You have a few options populating a local site manager:

1. So it via the ZMI. Go to a folder that is converted to a site (like the 
root folder) and click on Manage Site. This will forward you to the site 
management are where you can add those sort of thing.

2. Write an event subscriber to some initial event that adds the setup via 
Python.

3. Write a configurator plugin for you site. See:

http://svn.zope.org/z3c.configurator/

In my projects I never setup such objects by hand, because it allows me to 
easily tear down and reinitiate the entire application. We use option 3. We 
also use z3c.sampledata for setting up test data, including principals and 
their grants.

http://svn.zope.org/z3c.sampledata/

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] Laying out a Site

2006-09-06 Thread Stephan Richter
On Sunday 23 July 2006 17:24, Gabe Boys wrote:
 1)       I create a skin and in that skin a new layer plus the default and
 rotterdam layers.  Then each view I have in the future, I put on the layer
 for my skin.

In my projects we are not reusing rotterdam at all, because it has too much 
cruft. We ususally start with a minimal layer package that just contains 
traversal error handling and a few other registrations and go from there.

 2)       I create a macro that holds the basic markup for all of the pages.
 In this macro I have slots for the different parts of the page.  I would
 have slots for the title, meta, style in the header.  Then in the rest of
 the doc I put slots where dynamic content will be going.  So for example I
 would have a main content area, a side bar area and so on.

While we are still using a master template, or set of mast macros, their role 
has greatly diminished. We use zope.contentprovider and zope.viewlet heavily 
to make the UI pluggable. We also usually use a *much* smaller amount of 
slots in our main template.

 3)       Once I have all these slots set up then I make templates for the
 different content types I have.  So for example in my task there is a
 Project that has a bunch of attributes.  I would create template for a user
 to view the project.  When the user goes to the template for that Project,
 they see the attributes from the Project displayed per how the template is
 set up.

Yes, the new mode of operation is to use zope.formlib.

 Is that the right general idea?  I have recently heard of viewlets also,
 does anyone have any experiences good or bad with them?

You get the general idea right, but the books are a bit outdated and don't 
present the latest patterns. As one of the authors of viewlets, I think they 
are great of course. I would go so far: If you do not use viewlets in a new 
Zope 3 project, you are a fool. :-) Viewlets are components for the UI.

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: Newbie relationship question

2006-09-06 Thread Stephan Richter
On Thursday 27 July 2006 05:17, Carlo Cardelli wrote:
 - how do I get all my Customers instances? The Customer class is marked
 as 'Persistent' and 'IContentType'.

You have several choices:

1. Register your customer object as a utility and then do utility lookups. In 
this case you can reuse code in zope.app.component.vocabulary.

2. You probably have a convention where to find customers, like a 
CustomerContainer. You can setup your application to easily look up this 
container to get the entries.

 - how do I connect them to the vocabulary in a way to store a
 'reference' to the object and not, say, only its custName?

See zope.app.component.vocabulary; it provides one example.

 I have to fill 2 slots in the following:

 def CustomerVocabulary():
      allterms = []
      for customer in [ ...What goes here...? ]:
          oneTerm = zope.schema.vocabulary.SimpleTerm
                   ([...What goes here...?], title=customer.custName)

The value is the customer object itself. The token you are responsible for 
creating and depends on you choice above.


 A somewhat derived question:
 - Given a certain Invoice, how do I use the 'reference' to the Customer
 Object to access the Customer of the Invoice?

Python does not know the difference between references and actual objects. :-) 
It is smart to handle this itself. So the reference is the object.

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] Formlib examples

2006-09-06 Thread Stephan Richter
On Thursday 10 August 2006 22:32, Darryl Cousins wrote:
 I am having an extraordinary amount of bother coming to grips with the
 formlib module. Could anyone offer up complex examples with multiple
 schemas and subforms; and as an extended topic, examples including
 custom fields and widgets. My own attempts to date have ended up
 unneccessarily complex and indeed I have found it necessary to fall back
 to templates and BrowserView, to my shame.

Unfortunately, there are less formlib code samples out there than it should 
be. I think the SchoolTool project has started using formlib, so you might 
find some samples there. Also, zope.webdev uses formlib.

http://svn.zope.org/zope.webdev/

Unfortunately, this is all I have for you. I have plenty of customer code, but 
it would be too hard to extract for a response.

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 kind of Zope3 classes are available?

2006-09-06 Thread Stephan Richter
On Thursday 17 August 2006 16:39, Steve Juranich wrote:
 I'm nearly positive that my company won't want to spend the dough on
 on-site training (starting at $15,000), so what are my options?

Philipp is teaching a class in Copenhagen, which is full now, but maybe he is 
doing another one soon.

 I was told that there was a class /possibly/ being offered in California,
 but there's nothing firm on that yet.

The problem is that we did not find enough 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] need help on

2006-09-06 Thread Albertas Agejevas
On Wed, Sep 06, 2006 at 01:32:29PM +0400, Denis Shaposhnikov wrote:
 I'm thinking on how to use Zope3 for my task and need some help. I
 have a web application which have different look for different
 users. Every user need to authenticate and have a some type like an
 Administrator, Operator, SomeManager, Just-A-User and so on. For
 example my webapp have an URL like `http://server/mywebapp/`. So,
 after authentication every user see `http://server/mywebapp/`
 according his type.
 
 Could you give me advice or start point how to implement such behaviour
 in Zope3? The simplest way as I see is use different skins? But how to
 dynamically change the skin to user's type?

You can set the skin in a handler to BeforeTraverseEvent.  You can
find an example of such a subscriber at the bottom of
http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/app/browser/skin.py

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


Re: [Zope3-Users] Simple Sources tutorial?

2006-09-06 Thread Stephan Richter
On Friday 25 August 2006 17:08, Alec Munro wrote:
 Anyone have a simple reference on the usage of sources? I'm in need of
 a vocabulary-like thing, and my understanding is that vocabularies
 have been replaced by sources, but I am unable to find any
 documentation on their use. There are numerous discussions on specific
 details of sources, but I haven't found any real tutorials that cover
 how you register them, how you reference them, and real-world examples
 of their use.

I still use vocabularies. I still don't get sources. Vocabularies have not 
been deprecated yet. I think sources have to become much more 
developer-friendly before finding wide-spread support.

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 help on

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 05:32, Denis Shaposhnikov wrote:
 I'm thinking on how to use Zope3 for my task and need some help. I
 have a web application which have different look for different
 users. Every user need to authenticate and have a some type like an
 Administrator, Operator, SomeManager, Just-A-User and so on. For
 example my webapp have an URL like `http://server/mywebapp/`. So,
 after authentication every user see `http://server/mywebapp/`
 according his type.

You know that this violates the Web design as described by Fielding, right? 
(Yeah, yeah, I just read this stuff carefully; very enlightening!)

 Could you give me advice or start point how to implement such behaviour
 in Zope3? The simplest way as I see is use different skins? But how to
 dynamically change the skin to user's type?

I think Albert's solution is okay, but I would also suggest that you should 
consider redirecting to a different URL for each user. Those different URLs 
could reflect the different skins.

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] Groups, Principals and Permissions

2006-09-06 Thread Stephan Richter
On Friday 25 August 2006 05:18, Darryl Cousins wrote:
 So it 'appears' to me that the security looks up the groups differently?
 Or have I missed something?

Your approach is all good. I cannot confirm having problems with groups and I 
am using them in a customer project.

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] z3c.extfile and ZEO ?

2006-09-06 Thread Stephan Richter
On Friday 01 September 2006 09:36, Thierry Florac wrote:
 I just discovered the z3c.extfile package that I'd like to use in my
 current Zope3 development.
 My question is simple : what are the requirements to use this package in
 a ZEO context with several servers ?

We have not tried that yet, but will do so soon. I am pretty sure that the 
hash file directory must be shared via NFS or something. But I do not know 
enough about ZEO to make a really good statement.

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] Creating entries via direct HTML links

2006-09-06 Thread Stephan Richter
On Friday 01 September 2006 12:55, stephen tan wrote:
 How can I insert values using direct HTML links?
 http://localhost:port/insert_sql?id=234title=manageruser_id=345user_name
=fred

Why would you do this? This seems like an awful design.

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: pau, testbrowser, HTTP Error 403: Forbidden

2006-09-06 Thread Stephan Richter
On Sunday 27 August 2006 08:14, Darryl Cousins wrote:
 Doesn't pass. I can't figure how to use the test to test for what I
 expect - which is of course an exception.

Two choices that I commonly use for debugging:

1. print browser.contents; this will fail right away, but shows you the HTML 
that you can then anlyze and see what happened.

2. Use browser.handleErrors = False and see what's coming through.

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] Functional Tests

2006-09-06 Thread Stephan Richter
On Tuesday 29 August 2006 16:51, David Johnson wrote:
 I decided it's about time to use functional tests.  I've been setting them
 up with the following code and I get the
 following error (I've never gotten it to work):

Two comments:

1. Use zope.testbrowser

2. You must use the Zope 3 testrunner.

Hope that helps. :-)

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] 4 questions from a newcomer

2006-09-06 Thread Stephan Richter
On Tuesday 05 September 2006 11:10, Christophe Combelles wrote:
 Hello,

 I'm currently spending all my time to learn zope3, and while searching some
 doc, I have gathered some useful links in the following wiki page :
 http://ccomb.free.fr/wiki/wakka.php?wiki=Zope3
 (curr in french, but I will rewrite the text in english soon)
 Please feel free to add other useful links if you have some.


 Now I have 4 questions :
 (I've just swithed from 3.2.1 to 3.3.0b2, with python 2.4.4c0 on debian
 Sid.)

 1) TALES root variable
 --
 In a tales expression, where has the root context variable gone? In
 zope2, we could use path:root/path/to/object or path:/path/to/object,
 but it doesn't work with Zope 3. How can we access some object with an
 absolute path?

Right, there is not root namespace by default. I actually have never needed 
this feature. However, you can write your own TALES namespace adapter, so 
that you can say: mynamespace:root. We sometimes write our own namespace 
adapters to this sort of thing.

 2) utf-8 error in i18nfile
 --
 Why do I always get an error when I try to add some utf-8 text into an
 i18nfile? I just add an i18nfile in the ZMI, then I chose a name and I set
 the contentType to text/plain;charset=utf-8. If I enter some text with
 accents like éàôî, I get a system error which says : UnicodeDecodeError:
 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in
 range(128).
 I don't get any error with a simple File object.

Okay, I18n file is a demo that is probably not well-developed. Don't use it. I 
will propose to not distribute it anymore. Noone is using it, so you are on 
your own finding the problem and providing a patch.

 3) order attribute in browser:menuItem directive:
 ---
 I want to add a new view tab in the ZMI to be able to edit object
 attributes of some objects. So I'm adding a new menuItem in the zmi_views
 menu via ZCML with: browser:menuItem
  action=properties.html
  for=.mymodule.IMyClass
  title=properties
  menu=zmi_views
  permission=zope.ManageContent
  order=2 /
 (MyClass is just a derived Folder with custom attributes)
 The problem is: the new tab always appear in the first place. I would like
 to put it just after the content tab, not before. The order directive
 does not work for that. How can I reorder the tabs so that my new tab
 appears in the 2nd position?

The default implementation of menus sorts by interface first, and this item is 
most specific. See zope.app.publisher.browser.menu. If you do not like this 
behavior, you have to implement your own menu code.

In my customer development I am not using the menu code at all anymore. We use 
viewlets to do everything, including menus.

 4) workflow:
 
 Where is zope.app.workflow?

It has never been released with Zope 3, just as an add-on package. People are 
now encouraged to use zope.wfmc and zope.app.wfmc. There is also a z3lab 
extension specifically for document workflows.

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 help on skins

2006-09-06 Thread Denis Shaposhnikov
 Albertas == Albertas Agejevas [EMAIL PROTECTED] writes:

  behaviour in Zope3? The simplest way as I see is use different
  skins? But how to dynamically change the skin to user's type?

 Albertas You can set the skin in a handler to BeforeTraverseEvent.
 Albertas You can find an example of such a subscriber at the bottom
 Albertas of
 Albertas 
http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/app/browser/skin.py

Oh, thanks a lot!

Could somebody explain me how to find such information by myself. The
my main problem with Zope3 is that I don't known how Zope is working
as whole. I mean, what happend and where. I know about ++apidoc++ but
it seems no so usefull.

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Denis Shaposhnikov
 Stephan == Stephan Richter [EMAIL PROTECTED] writes:

 Stephan I think Albert's solution is okay, but I would also suggest
 Stephan that you should consider redirecting to a different URL for
 Stephan each user. Those different URLs could reflect the different
 Stephan skins.

Do you mean to redirect say Administrator to `/++skin++Admin/` and
Just-A-User to `/++skin++Just-A-User/`? That's a solution and even I
can hide `++skin++` part by WWW proxy to URIs like just `/Admin/` and
`/Just-A-User/`. But I have a question. How to prevent user of group
Just-A-User from accessing admin's skin for example? Can I use
simething like

page
name=details.html
permission=zope.AdminView
layer=admin_layer
template=admin_details.pt/

and

page
name=details.html
permission=zope.UserView
layer=user_layer
template=user_details.pt/

?

-- 
DSS5-RIPE DSS-RIPN 2:550/[EMAIL PROTECTED] 2:550/[EMAIL PROTECTED]
xmpp:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://neva.vlink.ru/~dsh/
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Albertas Agejevas
On Wed, Sep 06, 2006 at 03:32:45PM +0400, Denis Shaposhnikov wrote:
 Could somebody explain me how to find such information by myself. The
 my main problem with Zope3 is that I don't known how Zope is working
 as whole. I mean, what happend and where. I know about ++apidoc++ but
 it seems no so usefull.

Isn't it the same with any complex engineering system?  What do you
need to do in order to be able to diagnose and fix problems in car
engines?  Read a book or two, dip your toes in by fixing something
simple, gradually increase the complexity and you'll be an expert in a
year or six.

It's the same with Zope 3: read a couple of books, write a simple app
of your own, read the lists, participate on the IRC channel, fix bugs
in the collector.  Read the source.

There might be shortcuts, but generally in order to gain experience
you need to, well, spend time on building experience.

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


Re: [Zope3-Users] 4 questions from a newcomer

2006-09-06 Thread Thierry Florac




Le mercredi 06 septembre 2006  06:54 -0400, Stephan Richter a crit:


On Tuesday 05 September 2006 11:10, Christophe Combelles wrote:
 2) utf-8 error in i18nfile
 --
 Why do I always get an error when I try to add some utf-8 text into an
 i18nfile? I just add an i18nfile in the ZMI, then I chose a name and I set
 the contentType to text/plain;charset=utf-8. If I enter some text with
 accents like , I get a system error which says : UnicodeDecodeError:
 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in
 range(128).
 I don't get any error with a simple File object.

Okay, I18n file is a demo that is probably not well-developed. Don't use it. I 
will propose to not distribute it anymore. Noone is using it, so you are on 
your own finding the problem and providing a patch.



I had the same problem in my french site where we use many accentuated characters.
The solution I use until now is just to switch my Python interpreter to use UTF-8 as default encoding, via the site.py file of my Python distribution...




 Thierry





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


Re: [Zope3-Users] Formlib examples

2006-09-06 Thread Darryl Cousins
Cheers Stephan,

I've made quite a bit of progress since my posting of almost a month ago
with using formlib, espicially with more complex widgets. By keeping on
reading the code and debugging I am getting (slowly) a grip on it.

mpg.de has a good short tutorial that helped me with a sequence/object
combo.

Sincere regards,
Darryl

On Wed, 2006-09-06 at 06:23 -0400, Stephan Richter wrote:
 Unfortunately, there are less formlib code samples out there than it
 should 
 be. I think the SchoolTool project has started using formlib, so you
 might 
 find some samples there. Also, zope.webdev uses formlib.
 
 http://svn.zope.org/zope.webdev/
 
 Unfortunately, this is all I have for you. I have plenty of customer
 code, but 
 it would be too hard to extract for a response.
 
 Regards,
 Stephan 

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


Re: [Zope3-Users] Groups, Principals and Permissions

2006-09-06 Thread Darryl Cousins
Hi Stephan,

I forget already what I was doing wrong but after some digging in the
code I must have found what I was missing.

Thanks,
Darryl

On Wed, 2006-09-06 at 06:35 -0400, Stephan Richter wrote:
  So it 'appears' to me that the security looks up the groups
 differently?
  Or have I missed something?
 
 Your approach is all good. I cannot confirm having problems with
 groups and I 
 am using them in a customer project.
 
 Regards,
 Stephan 

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


Re: [Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-06 Thread Darryl Cousins
Cheers Stephan,

Yup. I added:

 provideAdapter(CollectionInputWidget,[ISequence, \
...IBrowserRequest], \
...IInputWidget)

To the test and now more form can be rendered in the doctest.

Many thanks,
Darryl

On Wed, 2006-09-06 at 06:58 -0400, Stephan Richter wrote:
 On Wednesday 06 September 2006 00:55, Darryl Cousins wrote:
  Following test setup formula in zope.app.form.browser I get this:
 
   provideAdapter(ListSequenceWidget,[IList,IField,IBrowserRequest], \
  ...IInputWidget,)
 
 You need a second adapter adapting just IList to IInputWidget. Here is what 
 the configuration of zope.app.form.browser does:
 
   view
   type=zope.publisher.interfaces.browser.IBrowserRequest
   for=zope.schema.interfaces.ISequence
   provides=zope.app.form.interfaces.IInputWidget
   factory=.CollectionInputWidget
   permission=zope.Public
   /
 
 Regards,
 Stephan

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


Re: [Zope3-Users] Re: pau, testbrowser, HTTP Error 403: Forbidden

2006-09-06 Thread Darryl Cousins
On Wed, 2006-09-06 at 06:45 -0400, Stephan Richter wrote:
 On Sunday 27 August 2006 08:14, Darryl Cousins wrote:
  Doesn't pass. I can't figure how to use the test to test for what I
  expect - which is of course an exception.
 
 Two choices that I commonly use for debugging:
 
 1. print browser.contents; this will fail right away, but shows you the HTML 
 that you can then anlyze and see what happened.

Yup, excepting that here it just displays HTML of the unauthorised view.

 
 2. Use browser.handleErrors = False and see what's coming through.

This I found at the time and helped me out.

Thanks,
Darryl

 
 Regards,
 Stephan

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


[Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread Baiju M

Hi all,

 (This is about : http://kpug.zwiki.org/Zope3Distilled)

This is yet another update of book progress.
Few days back I have requested  Stephan Richter
for using  Zope 3 Book's [1] content in  this work.
Now I got a reply from him, so we can use his works.
I have added attribution notice at the bottom of page.
Now there is some content in first 5 chapters.
But we cannot call it a book yet :)

To get the latest changes as mail, subscribe from here :
http://kpug.zwiki.org/Zope3Distilled/subscribeform
Thanks Simon for helping me to set up subscription form.

[1] 
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/FrontPage/Zope3Book

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


Re: [Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread Benji York

Baiju M wrote:

  (This is about : http://kpug.zwiki.org/Zope3Distilled)


I recommend you verify that you can use the Distilled name.  I believe 
computer book titles of that form are protected by an Addison-Wesley 
trademark.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread Baiju M

On 9/6/06, Benji York [EMAIL PROTECTED] wrote:

Baiju M wrote:
   (This is about : http://kpug.zwiki.org/Zope3Distilled)

I recommend you verify that you can use the Distilled name.  I believe
computer book titles of that form are protected by an Addison-Wesley
trademark.


How can I verify this. There are some titles from  Addison-Wesley.

But there is one from Apress also:
http://www.apress.com/book/bookDisplay.html?bID=230

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


Re: [Zope3-Users] Re: Newbie relationship question

2006-09-06 Thread Carlo Cardelli

Stephan Richter wrote:

On Thursday 27 July 2006 05:17, Carlo Cardelli wrote:


- how do I get all my Customers instances? The Customer class is marked
as 'Persistent' and 'IContentType'.



You have several choices:

1. Register your customer object as a utility and then do utility lookups. In 
this case you can reuse code in zope.app.component.vocabulary.
2. You probably have a convention where to find customers, like a 
CustomerContainer. You can setup your application to easily look up this 
container to get the entries.


Thank you for your answer. In the meantime I made some progress with 
containers.
In your opinion, which of these 2 options suits best for a large number 
of objects (say, about 100,000 customers)?
About vocabularies: In another post you say you'd rather use them 
instead of sources. As far as I can see, queryable sources seem the main 
choice for management of large collections. Example: a user wants to 
browse a list of all Customers beginning with a; I cannot fill the 
HTML page with about 5000 entries, but have to manage chunks of 
objects in some way. Hence a queryable object is needed.

Am I wrong? Is there a way to tweak vocabularies to support such cases?
Could anyone provide an example of a similar implementation? Note that I 
have to use a Relational db, so if I understand well I cannot use 
catalogs or similar.





A somewhat derived question:
- Given a certain Invoice, how do I use the 'reference' to the Customer
Object to access the Customer of the Invoice?





Re-reading this now, this was really a silly question...

Thank you again.

Carlo Cardelli.

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


Re: [Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread Benji York

Baiju M wrote:

On 9/6/06, Benji York [EMAIL PROTECTED] wrote:


Baiju M wrote:


 (This is about : http://kpug.zwiki.org/Zope3Distilled)


I recommend you verify that you can use the Distilled name.  I believe
computer book titles of that form are protected by an Addison-Wesley
trademark.



How can I verify this. There are some titles from  Addison-Wesley.


Wait and see if they send you a cease and desist letter?
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread +lupa+
One way is to use the US Patent and Trademark website search.  Here is a 
link to a search for Addison-Wesley in ALL fields there is no mention 
of distilled being registered as a word mark (not trademark, those are 
for logos and such).


http://tess2.uspto.gov/bin/showfield?f=tocstate=ntm86k.1.1p_search=searchssp_L=50BackReference=p_plural=yesp_s_PARA1=p_tagrepl%7E%3A=PARA1%24LDexpr=PARA1+AND+PARA2p_s_PARA2=Addison-Wesleyp_tagrepl%7E%3A=PARA2%24ALLp_op_ALL=ANDa_default=searcha_search=Submit+Querya_search=Submit+Query

Or just go to the USPTO home:  http://www.uspto.gov/   and click on 
Trademarks and then Search.


It looks to me like using Distilled is fine here.  If a lawyerly letter 
comes your way asking you to cease and desist someday, write back saying 
Oh, I'm so sorry, but if you can please refer me to the serial number and 
registration number for your U.S. word mark registration with which my use 
of Zope 3 Distilled is in conflict, so that I can refer this to my 
attorneys, I would be ever so grateful.  However I cannot possibly take any 
action based solely on your kind letter alone.  I look forward to hearing 
from you again.   XOX, Baiju.


IANAL,
+lupa+

At 09:49 AM 9/6/2006, Baiju M wrote:

On 9/6/06, Benji York [EMAIL PROTECTED] wrote:

Baiju M wrote:
   (This is about : http://kpug.zwiki.org/Zope3Distilled)

I recommend you verify that you can use the Distilled name.  I believe
computer book titles of that form are protected by an Addison-Wesley
trademark.


How can I verify this. There are some titles from  Addison-Wesley.

But there is one from Apress also:
http://www.apress.com/book/bookDisplay.html?bID=230

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



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


Re: [Zope3-Users] z3c.extfile and ZEO ?

2006-09-06 Thread Bernd Dorn
On 01.09.2006, at 15:36, Thierry Florac wrote:    Hi,  I just discovered the "z3c.extfile" package that I'd like to use in my current Zope3 development. My question is simple : what are the requirements to use this package in a ZEO context with several servers ?no problem, as stephan said you just have to share the directory which contains the filesthe files are immutable by implementation because their name is the sha digest of the file, so you never get a write conflict regards, Bernd  Thanks for any advise,  Thierry Florac --  Chef de projet intranet/internet   Office National des Forêts - Département Informatique   2, Avenue de Saint-Mandé   75570 PARIS Cedex 12   Mél : [EMAIL PROTECTED]   Tél. : +33 01.40.19.59.64   Fax. : +33 01.40.19.59.85  ___Zope3-users mailing listZope3-users@zope.orghttp://mail.zope.org/mailman/listinfo/zope3-users ___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.extfile and ZEO ?

2006-09-06 Thread David Pratt
Thierry, you may want to consider blobs when they become generally 
available through zodb. It takes care of the management details for ZEO 
and files.


Regard,
David

Bernd Dorn wrote:


On 01.09.2006, at 15:36, Thierry Florac wrote:



  Hi,

I just discovered the z3c.extfile package that I'd like to use in my 
current Zope3 development.
My question is simple : what are the requirements to use this package 
in a ZEO context with several servers ?


no problem, as stephan said you just have to share the directory which 
contains the files


the files are immutable by implementation because their name is the sha 
digest of the file, so you never get a write conflict 


regards, Bernd



Thanks for any advise,

  Thierry Florac
--
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

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





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


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


Re: [Zope3-Users] 4 questions from a newcomer

2006-09-06 Thread Martijn Faassen

Thierry Florac wrote:
[snip]

I had the same problem in my french site where we use many accentuated
characters.
The solution I use until now is just to switch my Python interpreter to
use UTF-8 as default encoding, via the site.py file of my Python
distribution...


If it works for you, so be it, but this is just to warn people that this 
is a really bad way to make encoding problems go away. Here's my longer 
rant about this:


Changing the Python default encoding considered harmful

http://faassen.n--tree.net/blog/view/weblog/2005/08/02/0

Regards,

Martijn

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


Re: [Zope3-Users] 4 questions from a newcomer

2006-09-06 Thread Martijn Faassen

Stephan Richter wrote:
[snip]

4) workflow:

Where is zope.app.workflow?


It has never been released with Zope 3, just as an add-on package. People are 
now encouraged to use zope.wfmc and zope.app.wfmc. There is also a z3lab 
extension specifically for document workflows.


If you are interested in just fairly simple but understandable workflow, 
you might want to look at hurry.workflow. It's in SVN here:


http://codespeak.net/svn/z3/hurry.workflow/trunk/

There's documentation in there:

http://codespeak.net/svn/z3/hurry.workflow/trunk/src/hurry/workflow/workflow.txt

Regards,

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


Re: [Zope3-Users] z3c.extfile and ZEO ?

2006-09-06 Thread Thierry FLORAC




On Wed, 2006-09-06 at 14:20 -0300, David Pratt wrote:


Thierry, you may want to consider blobs when they become generally 
available through zodb. It takes care of the management details for ZEO 
and files.



Is there any planned release date for this feature ?
Do you think that it could be included in the next stable release of Zope ??

Thanks for any information,
Thierry

P.S. : is there, in fact, any planned release date for the next stable release of Zope3 ? That can seem a stupid question, but I'm currently building a quite important web site with Zope3 (release 3.3.0b2) without any problem ; it's just quite difficult, on a political point of view, to convince managers that you are going to deploy your application with a Beta version of your application server...


-- 
This message has been scanned for viruses and
dangerous content by
MailScanner, and is
believed to be clean.

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


Re: [Zope3-Users] need help on skins

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 07:51, Denis Shaposhnikov wrote:
  Stephan == Stephan Richter [EMAIL PROTECTED] writes:

  Stephan I think Albert's solution is okay, but I would also suggest
  Stephan that you should consider redirecting to a different URL for
  Stephan each user. Those different URLs could reflect the different
  Stephan skins.

 Do you mean to redirect say Administrator to `/++skin++Admin/` and
 Just-A-User to `/++skin++Just-A-User/`? That's a solution and even I
 can hide `++skin++` part by WWW proxy to URIs like just `/Admin/` and
 `/Just-A-User/`.

Yep, that would be much more desirable. Of course you could use 
z3c.pluggabletraverser to produce those URLs in Zope as well.

 But I have a question. How to prevent user of group 
 Just-A-User from accessing admin's skin for example? Can I use
 simething like

 page
     name=details.html
     permission=zope.AdminView
     layer=admin_layer
     template=admin_details.pt/

 and

 page
     name=details.html
     permission=zope.UserView
     layer=user_layer
     template=user_details.pt/

 ?

Absolutely! :-) That's the point of layers and skins!

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: Newbie relationship question

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 09:58, Carlo Cardelli wrote:
  1. Register your customer object as a utility and then do utility
  lookups. In this case you can reuse code in
  zope.app.component.vocabulary.
  2. You probably have a convention where to find customers, like a
  CustomerContainer. You can setup your application to easily look up
  this container to get the entries.

 Thank you for your answer. In the meantime I made some progress with
 containers.
 In your opinion, which of these 2 options suits best for a large number
 of objects (say, about 100,000 customers)?

Definitely the second one. I would probably just use the name and only wake 
up (access) the object when needed, so that you do not keep loading 100k 
objects into RAM.

 About vocabularies: In another post you say you'd rather use them
 instead of sources. As far as I can see, queryable sources seem the main
 choice for management of large collections. Example: a user wants to
 browse a list of all Customers beginning with a; I cannot fill the
 HTML page with about 5000 entries, but have to manage chunks of
 objects in some way. Hence a queryable object is needed.
 Am I wrong? Is there a way to tweak vocabularies to support such cases?
 Could anyone provide an example of a similar implementation? Note that I
 have to use a Relational db, so if I understand well I cannot use
 catalogs or similar.

If you understand sources, then that's great! Don't unlearn that! It is a 
personal preference of mine not to use them, because I find them too 
difficult for my needs. But you clearly outline a need that I do not have, so 
a source might be exactly 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


[Zope3-Users] principal annotation alternative?

2006-09-06 Thread Hassan Alirezaei

hello guys.

I have been trying to make a homepage that users can register and have 
their own pages which they can change their settings. I also want these 
setting to be adjustable by the site owner as well.


I hear that I can not use Principal Annotations anymore because 
principals are not persistent in the new versions.

I have been using ZOPE 3.2.1 .

could anyone please explain me the general Idea in short how this is 
possible. If there are any links to sample codes that would be even 
greater. I just want to know what I need and how I should put them together.


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


[Zope3-Users] Page Template not interpreted

2006-09-06 Thread Sébastien VINOT

Hello,

I'm working with Philipp Von Weitershausen's book and I get a strong 
result concerning the Customizing a site's layout (chapt. 8) : After 
setting up all the files my object receipt displays a page which 
contains (on the code) the metal tags.


I've reduced the receiptview.pt to a title and a simple content and the 
result is :


My PT :

html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:tal=http://xml.zope.org/namespaces/tal;
 xmlns:metal=http://xml.zope.org/namespace/metal;
 metal:use-macro=context/@@standard_macros/page

head
 title metal:fill-slot=title
   tal:content=context/@@standard_macros/pageName/title
/head

body
 div metal:fill-slot=body
   Bonjour !!!
   Ici
 /div
/body
/html

And the HTML :

html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:metal=http://xml.zope.org/namespace/metal;
 metal:use-macro=context/@@standard_macros/page

head
 title metal:fill-slot=title[('version', '1.6'), ('mode', 'html'), ('setPosition', (1, 1)), ('setSourceFile', '/opt/Zope-3.2.1/lib/python/zope/app/rotterdam/template_tablelayout.pt'), ('beginScope', {u'define-macro': u'page'}), ('optTag', (u'metal:block', None, 'metal', 0, [('startTag', (u'metal:block', [(u'define-macro', u'page', 'metal')]))], [('setPosition', (1, 34)), ('defineSlot', (u'doctype', [('beginScope', {u'define-slot': u'doctype'}), ('optTag', (u'metal:block', None, 'metal', 0, [('startTag', (u'metal:block', [(u'define-slot', u'doctype', 'metal')]))], [('rawtextOffset', (u'lt;!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdgt;', 121))])), ('endScope', ())])), ('setPosition', (1, 190)), ('setSourceFile', '/opt/Zope-3.2.1/lib/python/zope/app/rotterdam/template_tablelayout.pt'), ('rawtextColumn', (u'\n\n', 0)), ('setPosition', (3, 0)), ('beginI18nContext', {'source': None, 'domain': u'zope', 'target': None}), ('beginScope', {u'lang': u'en', u'i18n:domain': u'zope', u'xmlns': u'http://www.w3.org/1999/xhtml', u'tal:define': usitemgmt python:'/++etc++site/' in str(request.URL), u'xml:lang': u'en'}), ('setLocal', (u'sitemgmt', lt;PythonExpr ('/++etc++site/' in str(request.URL))gt;)), ('startTag', (u'html', [(u'xmlns', u'xmlns=http://www.w3.org/1999/xhtml;'), (u'xml:lang', u'xml:lang=en'), (u'lang', u'lang=en'), (u'i18n:domain', u'zope', 'i18n'), (u'tal:define', usitemgmt python:'/++etc++site/' in str(request.URL), 'tal')])), ('rawtextColumn', (u'\n\n  lt;headgt;\n', 4)), ('setPosition', (10, 4)), ('defineSlot', (u'title', [('beginI18nContext', {'source': None, 'domain': 
u'zope', 'target': None}), ('beginScope', {u'metal:define-slot': u'title', u'tal:content': u'string:Z3: ${context/zope:title_or_name}'}), ('startTag', (u'title', [(u'metal:define-slot', u'title', 'metal'), (u'tal:content', u'string:Z3: ${context/zope:title_or_name}', 'tal')])), ('insertText', (lt;StringExpr u'Z3: ${context/zope:title_or_name}'gt;, [('rawtextOffset', (u'Z3 UI', 5))])), ('endScope', ()), ('rawtextOffset', (u'lt;/titlegt;', 8)), ('endI18nContext', ())])), ('setPosition', (11, 71)), ('setSourceFile', '/opt/Zope-3.2.1/lib/python/zope/app/rotterdam/template_tablelayout.pt'), ('rawtextBeginScope', (u'\n\n', 4, (13, 4), 0, {u'media': u'all', u'type': u'text/css', u'tal:content': u'string:@import url(${context/++resource++zope3_tablelayout.css});'})), ('startTag', (u'style', [(u'type', u'type=text/css'), (u'media', u'media=all'), (u'tal:content', u'string:@import url(${context/++resource++zope3_tablelayout.css});', 'tal')])), ('insertText', (lt;StringExpr u'@import url(${context/++resource++zope3_tablelayout.css});'gt;, [('rawtextColumn', (u'\n  @import url(zope3_tablelayout.css);\n', 4))])), ('rawtextBeginScope', (u'lt;/stylegt;\n\n', 4, (18, 4), 1, {u'media': u'all', u'tal:condition': u'sitemgmt', u'type': u'text/css', u'tal:content': u'string:@import url(${context/++resource++site_management_tablelayout.css});'})), ('condition', (lt;PathExpr standard:u'sitemgmt'gt;, [('startTag', (u'style', [(u'type', u'type=text/css'), (u'media', u'media=all'), (u'tal:condition', u'sitemgmt', 'tal'), (u'tal:content', u'string:@import url(${context/++resource++site_management_tablelayout.css});', 'tal')])), ('insertText', (lt;StringExpr u'@import 
url(${context/++resource++site_management_tablelayout.css});'gt;, [('rawtextColumn', (u'\n  @import url(site_management_tablelayout.css);\n', 4))])), ('rawtextOffset', (u'lt;/stylegt;', 8))])), ('endScope', ()), ('rawtextColumn', (u'\n\nlt;meta http-equiv=Content-Type content=text/html;charset=utf-8 /gt;\n\n', 4)), ('setPosition', (26, 4)), ('defineSlot', (u'headers', [('beginI18nContext', {'source': None, 'domain': u'zope', 'target': None}), ('beginScope', {u'define-slot': u'headers'}), ('optTag', (u'metal:block', None, 'metal', 1, [('startEndTag', (u'metal:block', [(u'define-slot', u'headers', 'metal')]))], [])), ('endScope', ()), ('endI18nContext', ())])), ('setPosition', (26, 4)), ('setSourceFile', 

Re: [Zope3-Users] principal annotation alternative?

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 16:55, Hassan Alirezaei wrote:
 I have been trying to make a homepage that users can register and have
 their own pages which they can change their settings. I also want these
 setting to be adjustable by the site owner as well.

 I hear that I can not use Principal Annotations anymore because
 principals are not persistent in the new versions.
 I have been using ZOPE 3.2.1 .

Quite the contrary. Principal Annotations were particularly build for 
non-persistent principals. Those annotations are not stored on a principal 
object attribute, but on the site. So you are all good.

 could anyone please explain me the general Idea in short how this is
 possible. If there are any links to sample codes that would be even
 greater. I just want to know what I need and how I should put them
 together.

Setting up PAU programmatically is a bit tricky, because there are several 
parts to it. You are best off reading everything in zope.app.authentication 
and you might also want to have a look at z3c.configurator, which provides a 
system to do additional site setup after the site is added.

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] Page Template not interpreted

2006-09-06 Thread Stephan Richter
On Wednesday 06 September 2006 17:09, Sébastien VINOT wrote:
 I'm a bit disappointed because I check several times my code and find
 nothing different with the example. Does someone has any idea where it
 can come from ?

Your macro is correctly looked up, but it is not rendered and the byte code is 
returned. This is indeed strange, since I have never seen this. Without a 
full setup, this is hard to debug.

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: z3c.extfile and ZEO ?

2006-09-06 Thread Philipp von Weitershausen

Thierry FLORAC wrote:

On Wed, 2006-09-06 at 14:20 -0300, David Pratt wrote:
Thierry, you may want to consider blobs when they become generally 
available through zodb. It takes care of the management details for ZEO 
and files.


Is there any planned release date for this feature ?
Do you think that it could be included in the next stable release of Zope ??


I think Chris and Theuni have planned this for the next ZODB release 
(November). I coould be wrong, though.


P.S. : is there, in fact, any planned release date for the next stable 
release of Zope3 ? That can seem a stupid question, but I'm currently 
building a quite important web site with Zope3 (release 3.3.0b2) without 
any problem ; it's just quite difficult, on a political point of view, 
to convince managers that you are going to deploy your application with 
a Beta version of your application server...


There'll be a release candidate shortly. If that produces no problems, I 
think a final version can be expected pretty soon after that.


Philipp

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


Re: [Zope3-Users] Simple Sources tutorial?

2006-09-06 Thread Fred Drake

On 9/6/06, Stephan Richter [EMAIL PROTECTED] wrote:

I still use vocabularies. I still don't get sources. Vocabularies have not
been deprecated yet. I think sources have to become much more
developer-friendly before finding wide-spread support.


Odd that you should mention this.  ;-)  We have a component that
should make many of the common cases *much* easier to work with for
sources.  I expect it will be ZPLed, but don't know when.


 -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Every sin is the result of a collaboration. --Lucius Annaeus Seneca
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 Distilled book update 3

2006-09-06 Thread Baiju M

Thanks Benji and Lupa for your suggestions.  I am going to change the book
title now itself to avoid problems in future.

I finalised a simple title for this book, Zope Guide. Yes, no 3 :)

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