[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py Remember that Hanno's fix should probably be made in zope.app.pagetemplate.

2008-04-18 Thread Philipp von Weitershausen
Log message for revision 85467:
  Remember that Hanno's fix should probably be made in zope.app.pagetemplate.
  

Changed:
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py

-=-
Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py  
2008-04-18 07:50:23 UTC (rev 85466)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/pagetemplatefile.py  
2008-04-18 12:43:22 UTC (rev 85467)
@@ -38,6 +38,10 @@
 
 id = property(getId)
 
+# TODO: This is basically a copy'n'paste job from the base class,
+# just to rename the 'instance' keyword argument and thus to allow
+# this argument to occur in **keywords.  Ideally, we should put this
+# fix in zope.app.pagetemplate and get rid of the duplication here.
 def __call__(self, __instance, *args, **keywords):
 instance = __instance
 namespace = self.pt_getContext(

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy Improve doctest paragraph about calling templates that are instance variables.

2008-04-18 Thread Philipp von Weitershausen
Log message for revision 85468:
  Improve doctest paragraph about calling templates that are instance variables.
  

Changed:
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.py
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.zcml
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt

-=-
Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.py
2008-04-18 12:43:22 UTC (rev 85467)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.py
2008-04-18 12:53:20 UTC (rev 85468)
@@ -49,12 +49,13 @@
 def __call__(self):
 return self.template()
 
-class LegacyTemplateTwo(BrowserView):
+class InstanceTemplate(BrowserView):
 
 def __init__(self, context, request):
 self.__parent__ = context
 self.context = context
 self.request = request
+# This is wrong (even though it used to work before):
 self.template = ViewPageTemplateFile('falcon.pt')
 
 def __call__(self):

Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.zcml
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.zcml  
2008-04-18 12:43:22 UTC (rev 85467)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy.zcml  
2008-04-18 12:53:20 UTC (rev 85468)
@@ -24,8 +24,8 @@
 
   browser:page
   for=*
-  name=template_two
-  class=.aqlegacy.LegacyTemplateTwo
+  name=instance_template
+  class=.aqlegacy.InstanceTemplate
   permission=zope.Public
   /
 

Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
 2008-04-18 12:43:22 UTC (rev 85467)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
 2008-04-18 12:53:20 UTC (rev 85468)
@@ -166,37 +166,35 @@
 Testing keyword arguments
 =
 
-ViewPageTemplateFile's take arbitrary keyword arguments:
+Instances of ViewPageTemplateFile can be accessed from outside the
+view and called.  They take arbitrary keyword arguments:
 
view = getMultiAdapter((self.folder, request), name='template')
template = view.template
print template(foo=1, bar=2)
   pThe falcon has taken flight/p
 
-Passing in an argument called instance was supported by the old Five version
-of ViewPageTemplateFile, so we still need to support it.
+Passing in an argument called ``instance`` was supported by the old
+Five version of ViewPageTemplateFile, so we still need to support it:
 
-In the zope.app.pagetemplate version, the first required argument is called
-instance, though.
-
print template(instance='allowed')
   pThe falcon has taken flight/p
 
 
-No arguments required
-=
+Class-level templates only
+==
 
-ViewPageTemplateFile's require no arguments, but you can only use them as
-class variables:
+ViewPageTemplateFile instances can only be used as class attributes.
+If you put one on an instance (as does the following view), you'll get
+a ``TypeError`` when you try to render the template:
 
-   view = getMultiAdapter((self.folder, request), name='template_two')
+   view = getMultiAdapter((self.folder, request), name='instance_template')
print view()
   Traceback (most recent call last):
   ...
   TypeError: __call__() takes at least 2 arguments (1 given)
   
 
-
 Clean up
 
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Baiju M

Paul Carduner wrote:

 Log message for revision 85449: creating a branch to see what I can
 do about extjs integration.


I found Jim removing two of his extjs related libraries from svn due
to license issues (r85246, r85248).

Please make sure that there is no license issue for your work committed 
to svn.


Since extjs is released under LGPL, I guess you can release the library in a
similar license, but only ZPL licensed thing can be committed to our svn :(

/me wonder what will become a library and application from the pont of view
of LGPL and Javascript.

Regards,
Baiju M

P.S: CCed to zope-dev to see if there is any other opinion.

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Philipp von Weitershausen

Tres Seaver wrote:
The second problem that might arise, is that the implicit assumption 
that every object inside Zope 2 inherits from Acquisition base classes 
no longer holds. Code that relies on the various aq_* attributes to be 
there need to be adjusted to use the Acquisition methods instead.


The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts in the wild which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.


Here's the deal:

* Instances of (subclasses of) Acquisition.Implicit and .Explicit still 
have those aq_* attributes. So basically all content objects still have 
them, no change there.


* Five's BrowserView class doesn't inherit from Acquisition.Explicit 
anymore, but we've provided the aq_* attributes for backward 
compatibility. So if a template does view/aq_parent, it will still work 
(we have tests for this). We haven't set an expiry date for this BBB, 
nor are we logging a warning. We probably should, though, if we 
eventually want to phase out Five's BrowserView class.



So, off the line there's no backward-compatibility problem. Now if 
people decide to implement their content objects without Acquisition 
(which they now can), then it's their problem if their templates still 
do obj/aq_*. This can be alleviated with a mix-in that Five has, which 
makes classes regain the aq_* attributes. Not sure if we want to make 
this public in any way, currently it's basically used for BrowserView 
and ViewletBase.

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 5 OK

2008-04-18 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Thu Apr 17 11:00:00 2008 UTC to Fri Apr 18 11:00:00 2008 UTC.
There were 5 messages: 5 from Zope Tests.


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Tests
Date: Thu Apr 17 21:00:05 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-April/009420.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Apr 17 21:01:35 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-April/009421.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Apr 17 21:03:05 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-April/009422.html

Subject: OK : Zope-2.11 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Apr 17 21:04:36 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-April/009423.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Apr 17 21:06:06 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-April/009424.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Wichert Akkerman
Previously Baiju M wrote:
 Since extjs is released under LGPL, I guess you can release the library in a
 similar license, but only ZPL licensed thing can be committed to our svn :(

There is still an ongoing debate about that even - the extjs authors
basically only want to offer LGPL to you if you meet certain criteria
but won't allow you to redistribute it with just standard LGPL
licensing.

That and the fact that extjs produces insane html (11 nested divs for a
simple table...) was reason for me to not use it.

Wichert.

-- 
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Stephan Richter
On Friday 18 April 2008, Wichert Akkerman wrote:
 There is still an ongoing debate about that even - the extjs authors
 basically only want to offer LGPL to you if you meet certain criteria
 but won't allow you to redistribute it with just standard LGPL
 licensing.

I just researched this a little bit and can see why there is controversy. 
However, I cannot see why I cannot check code in that does something with 
extjs, because I might have paid for a license, but still want to contribute 
my code under ZPL. Since I am not modifying the library in any way, I do not 
even have to make the code LGPL.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. Zope Stephan Richter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Martijn Faassen

Tres Seaver wrote:
[snip]
The second problem that might arise, is that the implicit assumption 
that every object inside Zope 2 inherits from Acquisition base classes 
no longer holds. Code that relies on the various aq_* attributes to be 
there need to be adjusted to use the Acquisition methods instead.


The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts in the wild which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.


I'm trying to understand what is proposed that would break them. All 
existing content objects will continue to use acquisition. Only things 
like Five views will stop using acquisition and switch to a __parent__ 
pointer. I doubt there are that many scripts that rely on getting a 
.aq_parent, say, on a Five view. There will be view code that relies on 
this, so I imagine we expect that should be rewritten to use the 
functions instead, but not scripts.


If we were to change OFS so that it'd start using __parent__ then I can 
see where you're coming from, but I don't think anyone's proposing that?


Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Jens Vagelpohl


On Apr 18, 2008, at 14:09 , Stephan Richter wrote:

On Friday 18 April 2008, Wichert Akkerman wrote:

There is still an ongoing debate about that even - the extjs authors
basically only want to offer LGPL to you if you meet certain criteria
but won't allow you to redistribute it with just standard LGPL
licensing.


I just researched this a little bit and can see why there is  
controversy.
However, I cannot see why I cannot check code in that does something  
with
extjs, because I might have paid for a license, but still want to  
contribute
my code under ZPL. Since I am not modifying the library in any way,  
I do not

even have to make the code LGPL.


Are you a lawyer? No? Thought so ;-)

jens



___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Jim Fulton


On Apr 18, 2008, at 4:28 AM, Baiju M wrote:

Paul Carduner wrote:

Log message for revision 85449: creating a branch to see what I can
do about extjs integration.


I found Jim removing two of his extjs related libraries from svn due
to license issues (r85246, r85248).

Please make sure that there is no license issue for your work  
committed to svn.


Since extjs is released under LGPL, I guess you can release the  
library in a
similar license, but only ZPL licensed thing can be committed to our  
svn :(



Because of ExtJS licensing issues, we should not check anything into  
the repository that builds on or requires ExtJS in any way.


Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Philipp von Weitershausen wrote:
 Tres Seaver wrote:
 The second problem that might arise, is that the implicit assumption 
 that every object inside Zope 2 inherits from Acquisition base classes 
 no longer holds. Code that relies on the various aq_* attributes to be 
 there need to be adjusted to use the Acquisition methods instead.
 The major downside here is that restricted code doesn't have access to
 the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
 hence use the attributes.  ('aq_base' should not be allowewd at all, as
 it strips away security context).

 There are probably thousands (or even tens of thousands) of templates
 and scripts in the wild which use these attributes.  I don't think we
 can break them in a single release:  we need to deprecate them first
 (with suitalbe logging output), and maybe even provide
 '__parent__'-aware workarounds / fallbacks in their implementations.
 
 Here's the deal:
 
 * Instances of (subclasses of) Acquisition.Implicit and .Explicit still 
 have those aq_* attributes. So basically all content objects still have 
 them, no change there.
 
 * Five's BrowserView class doesn't inherit from Acquisition.Explicit 
 anymore, but we've provided the aq_* attributes for backward 
 compatibility. So if a template does view/aq_parent, it will still work 
 (we have tests for this). We haven't set an expiry date for this BBB, 
 nor are we logging a warning. We probably should, though, if we 
 eventually want to phase out Five's BrowserView class.
 
 
 So, off the line there's no backward-compatibility problem. Now if 
 people decide to implement their content objects without Acquisition 
 (which they now can), then it's their problem if their templates still 
 do obj/aq_*. This can be alleviated with a mix-in that Five has, which 
 makes classes regain the aq_* attributes. Not sure if we want to make 
 this public in any way, currently it's basically used for BrowserView 
 and ViewletBase.

I realized after I sent it that BBB was automatic for the content
objects, making only views a possible issue:  I'm glad to learn that the
views have the attributes available.   I would recommend a perpetual
deprecation for the view BBB (log the warning with a note of the
recommended change, but don't indicate a removal release).

In any case, given the clarification, +1 to the merge.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFICKz6+gerLs4ltQ4RAqI9AJ9wWjhsca8iljbeb8z77eHMHgBv/gCdHfa4
SkkZqvDRAxPLPicSQM8ZCPQ=
=o+xz
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Stephan Richter
On Friday 18 April 2008, Jim Fulton wrote:
 Because of ExtJS licensing issues, we should not check anything into  
 the repository that builds on or requires ExtJS in any way.

I assume you got lawyer advice; can you elaborate with a few more sentences 
why? (I did read their license stuff last night and also the relevant 
sections of the LGPL.)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. Zope Stephan Richter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Chris McDonough

Martin Aspeli wrote:

Hanno Schlichting wrote:

Philipp von Weitershausen wrote:

Hanno Schlichting wrote:
Merging it into Zope trunk will get it into the Zope 2.12 release 
which is at this point not scheduled yet, but is unlikely to get a 
release before early 2009. This should give us plenty of time to test.
This sounds good. Here's another idea, though: In accordance with 
release early and often, how about scheduling the 2.12 release 
shortly after the 2.11 one? So the only new thing in 2.12 would be 
the philikon-aq branch (it would still ship with the same Zope 3 
libraries as 2.11, etc.).


I suspect we want to do something about the eggification story of Zope 
2 for Zope 2.12 as well. Figuring out the approach and documenting it 
might take some additional time. I don't see that releasing another 
Zope 2.13 shortly after 2.12 makes a lot of sense.


Why don't we get started on that, too, then?

I think eggification of Zope 2 is relatively easy, and most of the 
necessary RD has already been done. In fact, a lot of the eggs exist 
already.


I wonder if Philipp would be amenable to writing a proposal on this, and 
get Chris McDonough's input.


IMO, a Zope2 egg release should depend on the following packages:

- 'ZODB3' (already packaged)

- 'transaction' (depended on by newer ZODBs)

- 'ZConfig' (also depended on by newer ZODBs)

- 'StructuredText' (should be broken out into its own egg)

- 'docutils' (should use existing egg)

- 'mechanize' (should use existing egg)

- 'pytz' (should use existing egg)

- all zope.* packages (properly pinned) that zope2 depends on

The actual top-level egg that depends on these things would contain all the 
other packages depended on by Zope 2 (e.g. DateTime, Missing, Products/*, 
Acquisition, ExtensionClass, ZPublisher, ZServer, etc).  We might call it 
'zope2libs'.  What needs to get worked out is the ability to share headers 
between ZODB and this package so things can compile properly.


- C

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Checkins] SVN: z3c.formjs/branches/pcardune-extjs/ creating a branch to see what I can do about extjs integration.

2008-04-18 Thread Jim Fulton


On Apr 18, 2008, at 12:47 PM, Stephan Richter wrote:

On Friday 18 April 2008, Jim Fulton wrote:

Because of ExtJS licensing issues, we should not check anything into
the repository that builds on or requires ExtJS in any way.


I assume you got lawyer advice;


No.


can you elaborate with a few more sentences
why?


I could, but I'd rather not.  I suggest reading:

  http://mjg59.livejournal.com/84586.html

if you haven't already.

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] anyone heard of Zamasing?

2008-04-18 Thread Philip Kilner

Hi Tim,

Tim Nash wrote:

 @Phil,
   I think you will find the product learning curve isn't that steep
at all. The famous z-shaped curve has more to do with the lack of
up-to-date documentation than anything else. Products are the way to
go. It is very much like wriitng 'Scripts Python'. I am going to put a
simple 'boring' product on the zope.org site (if they let me) which
will show how to use zope and extjs for anyone who is interested.
Looking forward to your proof of concept



Know it is the way to go - seems hard because I'm an RDBMS developer not 
a Python coder, has been a long time coming as the stuff I do in the ZMI 
really is mostly glue - not so complex that the classic management 
issues of ZMI have bitten me particularly hard.


Motivation for going Products route is need to share (and thus improve!) 
ideas, and need to package code up for use by others as we grow our 
business. Starting point is currently the Beta Boring product by 
Betabug (Thanks Sascha!)


Am taking a week's break from my consulting gig next week, so will be on 
with writing this up after today.



--

Regards,

PhilK


'work as if you lived in the early days of a better nation'
- alasdair gray
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: authentication with python program

2008-04-18 Thread Josef Meile

Hi Miguel

First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:

security-policy-implementation python
verbose-security on

After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.

Best regards
Josef

Miguel Beltran R. schrieb:

I have this program what open a dtml what return a XML page, but I
have error with permisions:

import urllib, urllib2

pagina = http://10.28.1.239/bitacoras/alta/estado2.html;
datos = {btipo:D,
 bholo:87654321,
 bplac:dd-12345,
 accion:alta_gasolina,
}

params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password(AFICON, pagina, myuser, mypass)
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()

but returned XML say:
ajax
  accionalta_gasolina/accion
   respuestaerror/respuesta
error_typeUnauthorized/error_type
error_descriptionYou are not allowed to access 'zsql_alta'
in this context/error_description

  /ajax

help? how I can send HTTPBasicAuth?

pd. Sorry by my bad english


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Hi Miguel,

Is the dtml page accessable by the role myuser has?  Did you set the 
Use Database Methods permission for that role?






Hi Miguel

First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:

security-policy-implementation python
verbose-security on

After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.

Best regards
Josef

Miguel Beltran R. schrieb:

I have this program what open a dtml what return a XML page, but I
have error with permisions:

import urllib, urllib2

pagina = http://10.28.1.239/bitacoras/alta/estado2.html;
datos = {btipo:D,
 bholo:87654321,
 bplac:dd-12345,
 accion:alta_gasolina,
}

params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password(AFICON, pagina, myuser, mypass)
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()

but returned XML say:
ajax
  accionalta_gasolina/accion
   respuestaerror/respuesta
error_typeUnauthorized/error_type
error_descriptionYou are not allowed to access 'zsql_alta'
in this context/error_description

  /ajax

help? how I can send HTTPBasicAuth?

pd. Sorry by my bad english


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
#Martijn
Yes, have role manager

#Josef
After change options and restart
Z2.log:
10.28.1.18 - admin [18/Apr/2008:17:01:08 +0200] GET
/Control_Panel/manage_main HTTP/1.1 200 8023  Mozilla/5.0
(Windows; U; Windows NT 5.1; es-AR; rv:1.8.1.14) Gecko/20080404
Firefox/2.0.0.14
10.28.1.18 - Anonymous [18/Apr/2008:17:01:18 +0200] POST
/bitacoras/alta/estado2.html HTTP/1.1 200 692  Python-urllib/2.5

trace.log:
B 36356824 2008-04-18T17:01:08 GET /Control_Panel/manage_main
I 36356824 2008-04-18T17:01:08 0
A 36356824 2008-04-18T17:01:08 200 8023
E 36356824 2008-04-18T17:01:08
B 36356864 2008-04-18T17:01:18 POST /bitacoras/alta/estado2.html
I 36356864 2008-04-18T17:01:18 434
A 36356864 2008-04-18T17:01:18 200 692
E 36356864 2008-04-18T17:01:18

error_log:
nothing??



2008/4/18, Josef Meile [EMAIL PROTECTED]:
 Hi Miguel

  First, you could drop the Unauthorized Exception from the error_log
  object in the root folder of the zope management interface. Then
  activate the verbose-security option in your zope.conf file. To do
  this, you need to put/replace this lines:

  security-policy-implementation python
  verbose-security on

  After you have done this, you need to restart zope, try again your
  authentication script, and take a look at your event.log file or
  the error_log object. You may find the reason of why is this failing.
  In case you don't find it, then place the full traceback here.

  Best regards
  Josef

  Miguel Beltran R. schrieb:


  I have this program what open a dtml what return a XML page, but I
  have error with permisions:
 
  import urllib, urllib2
 
  pagina = http://10.28.1.239/bitacoras/alta/estado2.html;
  datos = {btipo:D,
  bholo:87654321,
  bplac:dd-12345,
  accion:alta_gasolina,
  }
 
  params=urllib.urlencode(datos)
  aut=urllib2.HTTPBasicAuthHandler()
  aut.add_password(AFICON, pagina, myuser, mypass)
  opener=urllib2.build_opener(aut)
  urllib2.install_opener(opener)
  r=urllib2.urlopen(pagina,params)
  print r.read()
  r.close()
 
  but returned XML say:
  ajax
   accionalta_gasolina/accion
respuestaerror/respuesta
 error_typeUnauthorized/error_type
 error_descriptionYou are not allowed to access 'zsql_alta'
  in this context/error_description
 
   /ajax
 
  help? how I can send HTTPBasicAuth?
 
  pd. Sorry by my bad english
 

  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )



-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

#Martijn
Yes, have role manager


  
What if you login with the user with your webbrowser instead of your 
python program?



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
Using web browser work fine.

Using wireshark I see what my python program not send WWW-Authentification.

Now I going to python list. But if someone know how can tell me please

2008/4/18, Martijn Jacobs [EMAIL PROTECTED]:
 Miguel Beltran R. wrote:

  #Martijn
  Yes, have role manager
 
 
 
 
  What if you login with the user with your webbrowser instead of your python
 program?


  --
  Martijn Jacobs
  Four Digits, Internet Solutions

  a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
 8161.22.234.B01
  e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
  tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117



-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs
I have a very old python script which does want you want, I can send it 
to you if you like.



Martijn

Using web browser work fine.

Using wireshark I see what my python program not send WWW-Authentification.

Now I going to python list. But if someone know how can tell me please

2008/4/18, Martijn Jacobs [EMAIL PROTECTED]:
  

Miguel Beltran R. wrote:



#Martijn
Yes, have role manager




  

 What if you login with the user with your webbrowser instead of your python
program?


 --
 Martijn Jacobs
 Four Digits, Internet Solutions

 a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
8161.22.234.B01
 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
 tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117





  



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
Yes please
and thakns to every body

2008/4/18, Martijn Jacobs [EMAIL PROTECTED]:

  I have a very old python script which does want you want, I can send it to
 you if you like.


  Martijn

  Using web browser work fine.

 Using wireshark I see what my python program not send WWW-Authentification.

 Now I going to python list. But if someone know how can tell me please

 2008/4/18, Martijn Jacobs [EMAIL PROTECTED]:


  Miguel Beltran R. wrote:



  #Martijn
 Yes, have role manager





  What if you login with the user with your webbrowser instead of your python
 program?


  --
  Martijn Jacobs
  Four Digits, Internet Solutions

  a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
 8161.22.234.B01
  e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
  tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117






  --
 Martijn Jacobs
 Four Digits, Internet Solutions

 a: Willemsplein 15-1 6811 KB Arnhem NL
 kvk: 09162137 | btw: 8161.22.234.B01
 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
 tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117




-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: anyone heard of Zamasing?

2008-04-18 Thread Tim Nash
Simon,
   I created a zexp that demonstrates the use of extjs and zope but I
don't know where to put it for anyone that might be interested. Can
the wiki.zope.org/zope2 site accept .zexp uploads?

 This zexp doesn't require the installation of extjs to see how it
works because it uses the extjs cached on the extjs site (for
demonstration purposes only)

This demonstrates:
1. separation of GUI from zope. (you could serve your zope data from
one continent and your GUI from another.)
2. use of extjs data storage (client cache of data reduces calls to zope)
3. loading of extjs  data storage widget via ajax and JSON
4.  ajax submit of form data
5. client side form field validation
and my favorite:
6.  webserver cache of GUI reduces load on zope making zope more scalable

-Tim


On Thu, Apr 17, 2008 at 6:35 PM, Simon Michael [EMAIL PROTECTED] wrote:
 Tim Nash wrote:

  up-to-date documentation than anything else. Products are the way to
  go. It is very much like wriitng 'Scripts Python'. I am going to put a
  simple 'boring' product on the zope.org site (if they let me) which
 

  Hi Tim.. put it also on http://wiki.zope.org/zope2 if you wish. That is an
 easy place to grow and rework documentation.



  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

Yes please
and thakns to every body
  

Here you go  :

#!/bin/python

import base64
import urllib2
base64string = base64.encodestring('%s:%s' % (username, password))
url = http://10.28.1.239/bitacoras/alta/estado2.html;
req = urllib2.Request(url)
req.add_header(Authorization, Basic %s % base64string)
handle = urllib2.urlopen(req)
print handle.read()




--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )