Re: [Zope3-Users] make check [OSX v3.3.0]

2006-10-10 Thread Jim Fulton

Robert Hicks wrote:

I get the following error and it is the only one:

Error in test checkVerificationInvalidationPersists 
(ZEO.tests.testConnection.MappingStorageConnectionTests)

Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/unittest.py", 
line 260, in run

testMethod()
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py", 
line 534, in checkVerificationInvalidationPersists

self._storage = self.openClientStorage('test')
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py", 
line 186, in openClientStorage

realm=realm)
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py", 
line 321, in __init__

self._wait(wait_timeout)
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py", 
line 342, in _wait

assert self._connection.is_async()
AttributeError: 'NoneType' object has no attribute 'is_async'


Is that a big deal?


Probably not, butplease submit a collector issue at:

  http://www.zope.org/Collectors/Zope3-dev

Please include information about whether this was a PPC or intel mac
and the OS version.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Intended scope of viewlets?

2006-10-10 Thread Alec Munro

You were correct, because my skin was inheriting from
z3c.layer.minimal.IMinimalBrowserLayer, which as best I can tell,
doesn't inherit from the default layer (there's probably a ZCML
directive to set this somewhere though), my
pages/templates/viewlets/etc weren't available to be looked up. I made
my skin inherit from IDefaultBrowserLayer, and everything's peachy.

Thanks everyone, for all your help so far.

Alec


On 10/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


I think the layer attribute may be missing.





Kevin Smith

- Original Message 
From: Alec Munro <[EMAIL PROTECTED]>
To: Jürgen Kartnaller <[EMAIL PROTECTED]>
Cc: zope3-users@zope.org
Sent: Friday, October 6, 2006 11:39:23 AM
Subject: Re: [Zope3-Users] Re: Intended scope of viewlets?

I think I must be missing something about the way skins work now. I've
created a master page that I can load when I don't specify a skin, but
when I do specify a skin (++skin++MySkin), it is unable to find the
page (404). Here's a rough approximation of my ZCML:







There's lots more, and if any of it would be relevant, let me know,
but this seems like it's the crucial part. I know it is finding the
skin itself successfully, because the error message is not the
standard Rotterdam one. The skin I'm using is currently just inherits
from z3c.layer.minimal.

I'll keep on trying things, but it's all kind of a shot in the dark right now.

Thanks,

Alec


On 10/6/06, Alec Munro <[EMAIL PROTECTED]> wrote:
> Hi Jürgen,
>
> So, just to give a concrete example for my case, I might replace this
> (Metal-based):
>
> 
>
> 
>   
> Nav tree needs a wee bit of work.
>   
> 
>
> 
>   
>Some Content
>   
> 
>
> 
>
> with this (viewlet-based):
>
> 
>
> 
> 
>   Nav tree needs a wee bit of work.
> 
> 
>
> 
>   
> Some Content
>   
> 
>
> 
>
> With seperate viewlet managers for "navigation" and "content", or any
> other types of views I would expect to have on this page? Would a
> "header" viewlet manager also be sensible, say if I wanted a title
> that changed format depending on what type of content was being
> viewed?
>
> Finally, are there any best practices for packaging in viewlet-based
> templating? I'm currently creating this in my.project.browser.skin.
> How about the viewlet manager names, should they be my.project.*,
> my.project.browser.*, or something different?
>
> Probably some of these questions aren't relevant to the work you are
> doing on viewlets, but I find it helpful to try to follow industry
> practices as closely as possible, especially on something I don't have
> much experience with, so I am easily able to follow tutorials, and
> people who are helping me can more easily understand what I am trying
> to do.
>
> Thanks very much for your help so far, I am excited about implementing
> viewlets in our upcoming project.
>
> Alec
>
> On 10/5/06, Jürgen Kartnaller <[EMAIL PROTECTED]> wrote:
> > Hi Alec.
> >
> > Alec Munro wrote:
> > > Hi List,
> > >
> > > I'm just getting up to speed with viewlets, having read a thread here
> > > and there in the past about them. I've installed the examples provided
> > > on this list, and while I believe I understand how they work, I don't
> > > understand in what circumstances they are most useful. The viewlets in
> > > the examples are all very small, such as retrieving an formatting a
> > > single piece of information about an object. However, from some of the
> > > posts to this list, I get the impression they are also being used for
> > > more complex items, like navigation menus.
> >
> > Menus are a perfect example for the use of viewlets.
> > Have a look at z3c.menu. This package contains a base implementation for
> > menus based on viewlets.
> >
> > > Is there a recommended scope? Can they be described in a way such as
> > > "develop your templates up to point X, then use a viewlet for
> > > development of further depth?".
> > >
> > > In my case, I am developing a new skin for a project, and my
> > > experience with metal says to make the entire HTML page a macro with
> > > slots for content and navigation. Is there a comparable viewlet-based
> > > paradigm?
> >
> > Yes there is one, see below
> >
> > >
> > > Also, am I correct in stating that when working with viewlets, the
> > > only complete HTML page will be the primary skin file, with all
> > > viewlets based on snippets of HTML?
> >
> > Thats exacly what we at Lovely Systems do and it works perfectly :)
> >
> > We have one base template which is used for all pages. Instead of
> > defining slots to be filled by other templates it contains viewlet managers.
> > We then provide different view classes to be able to register our
> > viewlets for the pages of the application.
> > The view classes are empty classes they are just providing the class
> > name or if they provide additional functionality they also provide an
> > interface.
> > It is then possible to register the viewlets for specific pages.
> > The most important thing

[Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Roger Ineichen
Hi

Can somebody confirm that the www.zope.org site and
the svn is not reachable?

I can only access the apache test page at:
http://download.zope.org/

Thanks

Rgards
Roger Ineichen
_
Projekt01 GmbH
www.projekt01.ch
Boesch 65
6331 Hünenberg
phone +41 (0)41 781 01 78
mobile+41 (0)79 340 52 32
fax   +41 (0)41 781 00 78
email [EMAIL PROTECTED]
_
END OF MESSAGE

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


Re: [Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Adam Groszer
Hello Roger,

u, yes
squid/2.5.STABLE6 says:
While trying to retrieve the URL: http://www.zope.org/

The following error was encountered: 
Connection Failed 

The system returned: 
(111) Connection refused

Tuesday, October 10, 2006, 3:35:34 PM, you wrote:

RI> Hi

RI> Can somebody confirm that the www.zope.org site and
RI> the svn is not reachable?

RI> I can only access the apache test page at:
RI> http://download.zope.org/

RI> Thanks

RI> Rgards
RI> Roger Ineichen
RI> _
RI> Projekt01 GmbH
RI> www.projekt01.ch
RI> Boesch 65
RI> 6331 Hünenberg
RI> phone +41 (0)41 781 01 78
RI> mobile+41 (0)79 340 52 32
RI> fax   +41 (0)41 781 00 78
RI> email [EMAIL PROTECTED]
RI> _
RI> END OF MESSAGE

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


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
We believe no evil till the evil's done. 
- Jean de La Fontaine 

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


Re: [Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Benji York

Adam Groszer wrote:

squid/2.5.STABLE6 says:
While trying to retrieve the URL: http://www.zope.org/

The following error was encountered: 
Connection Failed 

The system returned: 
(111) Connection refused


There appear to be some issues with the zope.org DNS as it is 
transitioned to third-party hosting, but the servers themselves are up. 
What IP does www.zope.org resolve to for you?

--
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] svn.zope.org and www.zope.org not online

2006-10-10 Thread Sascha Gresk

there are nameserver problems
www.zope.org should resolv to 63.240.213.171

said somebody on the irc ...


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


Re[2]: [Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Adam Groszer
Hello Benji,

www.zope.org works again. :-)
But FYI It's the following:

l:~ # dig www.zope.org

; <<>> DiG 9.2.4 <<>> www.zope.org
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42272
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.zope.org.  IN  A

;; ANSWER SECTION:
www.zope.org.   300 IN  A   63.240.213.171

;; AUTHORITY SECTION:
zope.org.   300 IN  NS  ns2.zope.com.
zope.org.   300 IN  NS  ns3.zope.com.

;; ADDITIONAL SECTION:
ns2.zope.com.   153300  IN  A   63.240.213.250
ns3.zope.com.   153300  IN  A   70.168.181.3

;; Query time: 162 msec
;; SERVER: 172.16.144.33#53(172.16.144.33)
;; WHEN: Tue Oct 10 16:16:46 2006
;; MSG SIZE  rcvd: 122


Tuesday, October 10, 2006, 3:58:56 PM, you wrote:

BY> Adam Groszer wrote:
>> squid/2.5.STABLE6 says:
>> While trying to retrieve the URL: http://www.zope.org/
>>
>> The following error was encountered:
>> Connection Failed
>>
>> The system returned:
>> (111) Connection refused

BY> There appear to be some issues with the zope.org DNS as it is
BY> transitioned to third-party hosting, but the servers themselves are up.
BY> What IP does www.zope.org resolve to for you?
BY> --
BY> Benji York
BY> Senior Software Engineer
BY> Zope Corporation

-- 
Best regards,
 Groszer Adam
--
Quote of the day:
Nor peace nor ease the heart can know; Which, like the needle true, Turns at 
the touch of joy or woe, But turning, trembles too. 
- Lady Greville 

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


RE: [Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Roger Ineichen
Hi Benji, Adam, Sascha

www.zope.org is  still not reachable. 
Do I get a old cached DNS entry from my DNS provider?

What is the correct working IP for svn.zope.org?


Here's my trace route:

Routenverfolgung zu www.zope.org [63.240.213.1]  über maximal 30 Abschnitte:

  1<1 ms<1 ms<1 ms  192.168.9.254
  2 *** Zeitüberschreitung der Anforderung.
  324 ms 6 ms 9 ms  212.4.64.161
  410 ms 8 ms 9 ms  dzr201.BB01-01.datazug.net [212.4.64.33]
  512 ms25 ms12 ms  gig-2-2-119.blxOTF001.gw.cablecom.net
[62.2.154.69]
  611 ms24 ms11 ms  ge-4-0-0.ar3.ZRH1.gblx.net [67.17.163.237]
  7   108 ms   106 ms   120 ms  so1-2-0-2488M.ar1.DCA3.gblx.net
[67.17.67.53]
  8   111 ms   110 ms   109 ms  gx-gw.wswdc.ip.att.net [192.205.32.41]
  9   129 ms   146 ms   125 ms  tbr1-p011701.wswdc.ip.att.net [12.123.8.106]
 10   109 ms   108 ms   110 ms  12.123.8.17
 11   111 ms   108 ms   105 ms  12.122.255.2
 12   107 ms   111 ms   108 ms  mdf2-bi8k-2-eth-2-2.wdc1.attens.net
[63.240.192.110]
 13   106 ms   105 ms   114 ms  63.240.213.1

Ablaufverfolgung beendet.

Also the same for svn.zope.org:

Routenverfolgung zu cvs.zope.org [63.240.213.1]  über maximal 30 Abschnitte:

  1<1 ms<1 ms<1 ms  192.168.9.254
  2 *** Zeitüberschreitung der Anforderung.
  3 7 ms 9 ms10 ms  212.4.64.161
  4 9 ms 8 ms10 ms  dzr201.BB01-01.datazug.net [212.4.64.33]
  513 ms11 ms 8 ms  gig-2-2-119.blxOTF001.gw.cablecom.net
[62.2.154.69]
  610 ms13 ms12 ms  ge-4-0-0.ar3.ZRH1.gblx.net [67.17.163.237]
  7   142 ms   109 ms   294 ms  so1-2-0-2488M.ar1.DCA3.gblx.net
[67.17.67.53]
  8   106 ms   107 ms   107 ms  gx-gw.wswdc.ip.att.net [192.205.32.41]
  9   138 ms   146 ms   131 ms  tbr1-p011701.wswdc.ip.att.net [12.123.8.106]
 10   106 ms   106 ms   108 ms  12.123.8.17
 11   109 ms   106 ms   106 ms  12.122.255.2
 12   137 ms   115 ms   108 ms  mdf2-bi8k-2-eth-2-2.wdc1.attens.net
[63.240.192.110]
 13   107 ms   110 ms   110 ms  63.240.213.1

Ablaufverfolgung beendet.

Regards
Roger Ineichen
_
END OF MESSAGE
 

> -Original Message-
> From: Benji York [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 10, 2006 3:59 PM
> To: Adam Groszer
> Cc: Roger Ineichen; 'zope3-users'
> Subject: Re: [Zope3-Users] svn.zope.org and www.zope.org not online
> 
> Adam Groszer wrote:
> > squid/2.5.STABLE6 says:
> > While trying to retrieve the URL: http://www.zope.org/
> > 
> > The following error was encountered: 
> > Connection Failed
> > 
> > The system returned: 
> > (111) Connection refused
> 
> There appear to be some issues with the zope.org DNS as it is 
> transitioned to third-party hosting, but the servers 
> themselves are up. 
> What IP does www.zope.org resolve to for you?
> --
> 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] svn.zope.org and www.zope.org not online

2006-10-10 Thread Benji York

Roger Ineichen wrote:
www.zope.org is  still not reachable. 
Do I get a old cached DNS entry from my DNS provider?


Not exactly, the IP hasn't changed.  The new DNS host seems to be 
handing out the wrong IPs.



What is the correct working IP for svn.zope.org?


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


[Zope3-Users] Re: Unable to start new Zope3 instance - missing meta.zcml

2006-10-10 Thread Philipp von Weitershausen

Kent Tenney wrote:

Howdy,

Zope3 trunk, r 70593 on W2K

I get a traceback when trying to start Zope3 from a newly
created instance. The instance is created in a new directory.


If that's actually the case (new directory), then you probably have some 
stale data in zopeskel/etc/package-includes. Suggestion: remove 
*-configure.zcml in there and do "make" again.


Btw, perhaps there's an actual reason for you to develop against the 
trunk, but problems like these don't happen with releases. You may want 
to consider using a release package.


C:\Python24\Lib\site-packages\zope3-trunk\bin>python mkzopeinstance -d 
\tmp\z3

Please choose a username for the initial administrator account.

Verify password:

C:\Python24\Lib\site-packages\zope3-trunk\bin>cd \tmp\z3\bin

C:\tmp\z3\bin>runzope

C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\config.py:204: 

DeprecationWarning: zope.app.mail has moved to zope.sendmail. Import of 
zope.app

.mail will become unsupported in Zope 3.5
 return __import__(mname+'.'+oname, *_import_chickens)
Traceback (most recent call last):
 File "C:\tmp\z3\bin\runzope", line 48, in ?
   run()
 File "C:\tmp\z3\bin\runzope", line 44, in run
   main(["-C", CONFIG_FILE] + sys.argv[1:])
 File 
"C:\Python24\Lib\site-packages\zope3\src\zope\app\twisted\main.py", line

73, in main
 File 
"C:\Python24\Lib\site-packages\zope3\src\zope\app\twisted\main.py", line

142, in setup
 File 
"c:\Python24\Lib\site-packages\zope3\src\zope\app\appsetup\appsetup.py",

line 110, in config
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 587, in file
   include(context, name, package)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 523, in include
   processxmlfile(f, context)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 378, in processxmlfile
   parser.parse(src)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 109, 
in pars

e
   xmlreader.IncrementalParser.parse(self, source)
 File "C:\Python24\lib\site-packages\xml\sax\xmlreader.py", line 123, in 
parse

   self.feed(buffer)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 216, 
in feed


   self._parser.Parse(data, isFinal)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 364, 
in end_

element_ns
   self._cont_handler.endElementNS(pair, None)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 357, in endElementNS
   self.context.end()
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\config.

py", line 542, in end
   self.stack.pop().finish()
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\config.

py", line 690, in finish
   actions = self.handler(context, **args)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 523, in include
   processxmlfile(f, context)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 378, in processxmlfile
   parser.parse(src)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 109, 
in pars

e
   xmlreader.IncrementalParser.parse(self, source)
 File "C:\Python24\lib\site-packages\xml\sax\xmlreader.py", line 123, in 
parse

   self.feed(buffer)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 216, 
in feed


   self._parser.Parse(data, isFinal)
 File "C:\Python24\lib\site-packages\xml\sax\expatreader.py", line 364, 
in end_

element_ns
   self._cont_handler.endElementNS(pair, None)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 357, in endElementNS
   self.context.end()
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\config.

py", line 542, in end
   self.stack.pop().finish()
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\config.

py", line 690, in finish
   actions = self.handler(context, **args)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 516, in include
   f = openInOrPlain(path)
 File 
"C:\Python24\Lib\site-packages\zope3-trunk\src\zope\configuration\xmlconf

ig.py", line 427, in openInOrPlain
   fp = open(filename)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File 
"C:\tmp\z3\etc\site

.zcml", line 3.2-3.50
   ZopeXMLConfigurationError: File 
"C:\tmp\z3\etc\package-includes\mail-meta.zc

ml", line 1.0-1.51
   IOError: [Errno 2] No such file or directory: 
'C:\\Python24\\Lib\\site-packa

ges\\zope3-trunk\\src\\zope\\app\\mail\\meta.zcml'


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


Re: [Zope3-Users] svn.zope.org and www.zope.org not online

2006-10-10 Thread Marius Gedminas
On Tue, Oct 10, 2006 at 11:48:35AM -0400, Benji York wrote:
> Roger Ineichen wrote:
> >www.zope.org is  still not reachable. 
> >Do I get a old cached DNS entry from my DNS provider?
> 
> Not exactly, the IP hasn't changed.  The new DNS host seems to be 
> handing out the wrong IPs.

Just double-checking: the SSH host key shouldn't have changed?
I'm getting this warning now:

  @@@
  @   WARNING: POSSIBLE DNS SPOOFING DETECTED!  @
  @@@
  The RSA host key for svn.zope.org has changed,
  and the key for the according IP address 63.240.213.171
  is unknown. This could either mean that
  DNS SPOOFING is happening or the IP address for the host
  and its host key have changed at the same time.

> >What is the correct working IP for svn.zope.org?
> 
> 63.240.213.173

Ok, that's a new one.  I see 63.240.213.171 in one network, and
63.240.213.1 back at the office.

It's probably best to wait until the various DNS servers stop acting
crazy.

Marius Gedminas
-- 
It's not illegal to disagree with my opinions (*).
[...]
(*) Although it obviously _should_ be. Mwhaahahahahaaa... You unbelievers
will all be shot when the revolution comes!
-- Linus Torvalds


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


Re: [Zope3-Users] Re: Intended scope of viewlets?

2006-10-10 Thread Alec Munro

One more thing. When using this masterpage idea, what is the pattern
for creating new pages? For example, I would traditionally have:

MyObject/SubjectOne.html
MyObject/SubjectTwo.html
MyObject/SubjectThree.html

Registered with:



...

Where "subjectone.pt" would probably start with something like the following:



Obviously, the above no longer applies, so what's the equivalent? My
initial thought, if I am sticking as close to the above paradigm as
possible, would be to have registrations for each that all reference
the same class, being the one that implements the interface my
masterpage is registered for. Something like the following:





...

In some ways, this makes sense to me, but it leaves me unsure how to
properly differentiate the content on each page, without implementing
something on each ViewletManager that detects the name of the page
requested, and returns the appropriate content. Unless of course I can
register Viewlets or ViewletManagers to specific page names?

My guess is that the above pattern simply isn't applicable to the use
of viewlets, and there is something else I should be using. I will
investigate uses of viewlets, but if anyone knows the answer offhand,
I would very much appreciate it.

Thanks again,

Alec Munro



On 10/10/06, Alec Munro <[EMAIL PROTECTED]> wrote:

You were correct, because my skin was inheriting from
z3c.layer.minimal.IMinimalBrowserLayer, which as best I can tell,
doesn't inherit from the default layer (there's probably a ZCML
directive to set this somewhere though), my
pages/templates/viewlets/etc weren't available to be looked up. I made
my skin inherit from IDefaultBrowserLayer, and everything's peachy.

Thanks everyone, for all your help so far.

Alec


On 10/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I think the layer attribute may be missing.
>
>  name="my.project.index.html"
> for="*"
> class=".myskin.SimplePage"
> permission="zope.Public"
> layer=".interfaces.MySkin"
> />
>
>  template="myskin_master.pt"
> for=".interfaces.ISimplePage"
> layer=".interfaces.MySkin"
> />
>
> Kevin Smith
>
> - Original Message 
> From: Alec Munro <[EMAIL PROTECTED]>
> To: Jürgen Kartnaller <[EMAIL PROTECTED]>
> Cc: zope3-users@zope.org
> Sent: Friday, October 6, 2006 11:39:23 AM
> Subject: Re: [Zope3-Users] Re: Intended scope of viewlets?
>
> I think I must be missing something about the way skins work now. I've
> created a master page that I can load when I don't specify a skin, but
> when I do specify a skin (++skin++MySkin), it is unable to find the
> page (404). Here's a rough approximation of my ZCML:
>
>  interface=".interfaces.MySkin"
> type="zope.publisher.interfaces.browser.IBrowserSkinType"
> name="MySkin"
> />
>
>  name="my.project.index.html"
> for="*"
> class=".myskin.SimplePage"
> permission="zope.Public"
> />
>
>  template="myskin_master.pt"
> for=".interfaces.ISimplePage"
> />
>
> There's lots more, and if any of it would be relevant, let me know,
> but this seems like it's the crucial part. I know it is finding the
> skin itself successfully, because the error message is not the
> standard Rotterdam one. The skin I'm using is currently just inherits
> from z3c.layer.minimal.
>
> I'll keep on trying things, but it's all kind of a shot in the dark right now.
>
> Thanks,
>
> Alec
>
>
> On 10/6/06, Alec Munro <[EMAIL PROTECTED]> wrote:
> > Hi Jürgen,
> >
> > So, just to give a concrete example for my case, I might replace this
> > (Metal-based):
> >
> > 
> >
> > 
> >   
> > Nav tree needs a wee bit of work.
> >   
> > 
> >
> > 
> >   
> >Some Content
> >   
> > 
> >
> > 
> >
> > with this (viewlet-based):
> >
> > 
> >
> > 
> > 
> >   Nav tree needs a wee bit of work.
> > 
> > 
> >
> > 
> >   
> > Some Content
> >   
> > 
> >
> > 
> >
> > With seperate viewlet managers for "navigation" and "content", or any
> > other types of views I would expect to have on this page? Would a
> > "header" viewlet manager also be sensible, say if I wanted a title
> > that changed format depending on what type of content was being
> > viewed?
> >
> > Finally, are there any best practices for packaging in viewlet-based
> > templating? I'm currently creating this in my.project.browser.skin.
> > How about the viewlet manager names, should they be my.project.*,
> > my.project.browser.*, or something different?
> >
> > Probably some of these questions aren't relevant to the work you are
> > doing on viewlets, but I find it helpful to try to follow industry
> > practices as closely as possible, especially on something I don't have
> > much experience with, so I am easily able to follow tutorials, and
> > people who are helping me can more easily understand what I am trying
> > to do.
> >
> > Thanks very much for your help so far, I am excited about implementing
> > viewlets in our upcoming project.
> >
> > Alec
> >
> > On 10/5/06, Jürgen Kartnaller 

[Zope3-Users] Re: make check [OSX v3.3.0]

2006-10-10 Thread Robert Hicks

Jim Fulton wrote:

Robert Hicks wrote:

I get the following error and it is the only one:

Error in test checkVerificationInvalidationPersists 
(ZEO.tests.testConnection.MappingStorageConnectionTests)

Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/unittest.py", 
line 260, in run

testMethod()
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py", 
line 534, in checkVerificationInvalidationPersists

self._storage = self.openClientStorage('test')
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/tests/ConnectionTests.py", 
line 186, in openClientStorage

realm=realm)
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py", 
line 321, in __init__

self._wait(wait_timeout)
  File 
"/usr/local/src/Zope-3.3.0/build/lib.macosx-10.4-fat-2.4/ZEO/ClientStorage.py", 
line 342, in _wait

assert self._connection.is_async()
AttributeError: 'NoneType' object has no attribute 'is_async'


Is that a big deal?


Probably not, butplease submit a collector issue at:

  http://www.zope.org/Collectors/Zope3-dev

Please include information about whether this was a PPC or intel mac
and the OS version.

Jim


I will do so when I get home.

Robert

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


[Zope3-Users] Re: Intended scope of viewlets?

2006-10-10 Thread Jürgen Kartnaller

Hi Alec.

Alec Munro wrote:

One more thing. When using this masterpage idea, what is the pattern
for creating new pages? For example, I would traditionally have:

MyObject/SubjectOne.html
MyObject/SubjectTwo.html
MyObject/SubjectThree.html

Registered with:



...

Where "subjectone.pt" would probably start with something like the 
following:




Obviously, the above no longer applies, so what's the equivalent? My
initial thought, if I am sticking as close to the above paradigm as
possible, would be to have registrations for each that all reference
the same class, being the one that implements the interface my
masterpage is registered for. Something like the following:





...

In some ways, this makes sense to me, but it leaves me unsure how to
properly differentiate the content on each page, without implementing
something on each ViewletManager that detects the name of the page
requested, and returns the appropriate content. Unless of course I can
register Viewlets or ViewletManagers to specific page names?


Thats what the view parameter in the viewlet directive is doing :)



My guess is that the above pattern simply isn't applicable to the use
of viewlets, and there is something else I should be using. I will
investigate uses of viewlets, but if anyone knows the answer offhand,
I would very much appreciate it.


Simply derive a new view class from SimplePage and use that class when 
registering a new page.


class AnotherPage(SimplePage):
   pass

Now you can register a new page. Note taht we do not need to define the 
template because it is already defined for SimplePage.




You can now register your viewlets on that class (page) :


Also note that all viewlets registered for SimplePage are also visible 
in the new page. You register globally visible viewlets on your SimplePage.


Its simple and powerful, isn't it ?

The most important thing you must see is the ability to register a 
viewlet on the context, the view, the manager and the request. This 
gives you a lot of control over the viewlet.



Here is the code I'm using for my viewletmanager to have more control 
over the visibility of viewlets. I use this manager im my main template.


class ContentViewletManager(WeightOrderedViewletManager):
interface.implements(IContentViewletManager)

def filter(self, viewlets):
viewlets = super(ContentViewletManager, self).filter(viewlets)
return [(name, viewlet) for name, viewlet in viewlets
  if getattr(viewlet, 'available', True)]

If the viewlet provides the property 'available' it can control if it is 
visible or not. Among other things I use this often to have a dependency 
on user login. IUnauthenticatedPrincipal.providedBy(self.request.principal)





Thanks again,

Alec Munro



On 10/10/06, Alec Munro 
<[EMAIL PROTECTED]> wrote:

You were correct, because my skin was inheriting from
z3c.layer.minimal.IMinimalBrowserLayer, which as best I can tell,
doesn't inherit from the default layer (there's probably a ZCML
directive to set this somewhere though), my
pages/templates/viewlets/etc weren't available to be looked up. I made
my skin inherit from IDefaultBrowserLayer, and everything's peachy.

Thanks everyone, for all your help so far.

Alec


On 10/7/06, [EMAIL PROTECTED] 
<[EMAIL PROTECTED]> wrote:

>
> I think the layer attribute may be missing.
>
>  name="my.project.index.html"
> for="*"
> class=".myskin.SimplePage"
> permission="zope.Public"
> layer=".interfaces.MySkin"
> />
>
>  template="myskin_master.pt"
> for=".interfaces.ISimplePage"
> layer=".interfaces.MySkin"
> />
>
> Kevin Smith
>
> - Original Message 
> From: Alec Munro <[EMAIL PROTECTED]>
> To: Jürgen Kartnaller <[EMAIL PROTECTED]>
> Cc: zope3-users@zope.org
> Sent: Friday, October 6, 2006 11:39:23 AM
> Subject: Re: [Zope3-Users] Re: Intended scope of viewlets?
>
> I think I must be missing something about the way skins work now. I've
> created a master page that I can load when I don't specify a skin, but
> when I do specify a skin (++skin++MySkin), it is unable to find the
> page (404). Here's a rough approximation of my ZCML:
>
>  interface=".interfaces.MySkin"
> type="zope.publisher.interfaces.browser.IBrowserSkinType"
> name="MySkin"
> />
>
>  name="my.project.index.html"
> for="*"
> class=".myskin.SimplePage"
> permission="zope.Public"
> />
>
>  template="myskin_master.pt"
> for=".interfaces.ISimplePage"
> />
>
> There's lots more, and if any of it would be relevant, let me know,
> but this seems like it's the crucial part. I know it is finding the
> skin itself successfully, because the error message is not the
> standard Rotterdam one. The skin I'm using is currently just inherits
> from z3c.layer.minimal.
>
> I'll keep on trying things, but it's all kind of a shot in the dark 
right now.

>
> Thanks,
>
> Alec
>
>
> On 10/6/06, Alec Munro 
<[EMAIL PROTECTED]> wrote:

> > Hi Jürgen,
> >
> >

[Zope3-Users] Get Started

2006-10-10 Thread Luiz Fernando Bernardes Ribeiro
Hello all,Is there any tool to automate the bootstrap of a new project? Something like ArcheGen XML? To generates all the initial Interfaces, Implementation classes and the configure.zcml?Thanks in advance,
-- Luiz Fernando B. Ribeiro
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ForbiddenAttribute on "locate" method

2006-10-10 Thread Thierry FLORAC

  Hi,

I try to setup a little application but have a probably little problem
with a ForbiddenAttribute exception on "location.locate" method.
Here is my setup :

class IPhoto(IContainer,IContained):
"""Photo handling interface"""
...
image = Bytes(...)
...

class Photo(Folder):
"""Photo handling class"""
...
image = None
def __init__(self, image=None):
super(Photo,self).__init__()
self.__parent__ = self.__name__ = None
if image:
self.image = image
...

class IEvent(IContained):
"""Event handling interface"""
...

class Event(Persistent):
"""Event handling class"""
...
def __init__(self):
super(Event,self).__init__()
self.__parent__ = self.__name__ = None

In my event creation form (derived from formlib.AddForm), I put
something like this, without a problem :

def create(self, data):
event = Event()
if data.has_key('image'):
event.image = Photo(image=data['image'])
location.locate(event.image, event, 'image')
form.applyChanges(event, self.form_fields, data)
return event

"event.image" access can then be granted easily in an URL through a
"z3c.traverser" plug-in and everything works fine... until now !
Because when I'm trying to make the same thing in an edit form to update
an existing event, an exception is raised :

def edit(self, action, data):
changed = False
event = self.context
if data.has_key('image'):
event.image = Photo(image=data['image'])
location.locate(event.image, event, 'image')
changed = True
return super(EventEditForm,self).edit(action, data) or
changed

Here is the traceback :

Traceback (most recent call last):
  File "/usr/local/zope/3.3.0/lib/python/zope/publisher/publish.py", line 133, 
in publish
result = publication.callObject(request, obj)
  File 
"/usr/local/zope/3.3.0/lib/python/zope/app/publication/zopepublication.py", 
line 161, in callObject
return mapply(ob, request.getPositionalArguments(), request)
  File "/usr/local/zope/3.3.0/lib/python/zope/publisher/publish.py", line 108, 
in mapply
return debug_call(obj, args)
   - __traceback_info__: 
  File "/usr/local/zope/3.3.0/lib/python/zope/publisher/publish.py", line 114, 
in debug_call
return obj(*args)
  File "/usr/local/zope/3.3/lib/python/zope/formlib/form.py", line 751, in 
__call__
self.update()
  File "/usr/local/zope/3.3/lib/python/zope/formlib/form.py", line 732, in 
update
result = action.success(data)
  File "/usr/local/zope/3.3/lib/python/zope/formlib/form.py", line 582, in 
success
return self.success_handler(self.form, self, data)
  File "/var/local/zope/3.3/lib/python/ulthar/forms/forms.py", line 104, in 
handle_edit_action
self.edit_action(action,data)
  File "/var/local/zope/3.3/lib/python/ulthar/forms/forms.py", line 107, in 
edit_action
if not self.edit(action, data):
  File "/var/local/zope/3.3/lib/python/usf/news/browser/event.py", line 85, in 
edit
location.locate(event.image, event, 'image')
  File "/usr/local/zope/3.3.0/lib/python/zope/location/location.py", line 71, 
in locate
object.__parent__ = parent
ForbiddenAttribute: ('__parent__', )


I've tried to setup different permissions and access rights, but without 
success.
So any help would be great !

Thanks,
Thierry



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