Re: [Zope3-Users] zpt pages though ZMI

2006-10-30 Thread Stephan Richter
On Monday 25 September 2006 07:49, Hassan Alirezaei wrote:
> but when I upload the ZPT and look at it, ONLY ZCML users render without
> any problem. unauthenticated user in the ZCML also can not render.

Note that we do not support TTW development in Zope 3. Thus there is little to 
no know-how on these lists in this area.

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] zpt pages though ZMI

2006-09-24 Thread Hassan Alirezaei

Hassan Alirezaei wrote:



In my own skin I'm using
User

with no problem for either zcml principals nor pau principals.
  

Thanks Darryl, I got it working.  did the trick!


I thought It did work Darryl But I had a small mistake in the template 
so the whole request/principal/title was not even parsed. Now that I fix 
it again with:


User

it still doesn't work.  when I print the Principal object itself 
(request/principal) i get


at 0xb669fccc>


for the zope.manager and

instance at 0xb596d22c>


for the PAU manager which is different as expectedly different of course. 


*
once again to the original problem,  when I upload the following ZPT 
page through the ZMI,


--
 


I get the following error when viewing it while logged in with a PAU 
principal:



 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 217, in __call__

   return self._eval(econtext)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 194, in _eval

   ob = self._subexprs[-1](econtext)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 124, in _eval

   ob = self._traverser(ob, element, econtext)
 File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
line 68, in __call__

   request=request)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 164, in traversePathElement

   return traversable.traverse(nm, further_path)
  - __traceback_info__: (Principal(u'isi.mas.hassy'), 'title')
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 52, in traverse

   raise TraversalError(subject, name)
  - __traceback_info__: (Principal(u'isi.mas.hassy'), 'title', [])
TraversalError: (Principal(u'isi.mas.hassy'), 'title')
---

here is how I refer to the request/principal/title   :

---
  

  User:
  User


  

  

  
-

usingUser
will work quite fine on every normal page I have and I can get the title 
for all the principals (ZCML and PAU)


but when I upload the ZPT and look at it, ONLY ZCML users render without 
any problem. unauthenticated user in the ZCML also can not render.



Thank you again for any help.

Regards,
Hassan



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


Re: [Zope3-Users] zpt pages though ZMI

2006-09-24 Thread Hassan Alirezaei


In my own skin I'm using 


User

with no problem for either zcml principals nor pau principals.
  

Thanks Darryl, I got it working.  did the trick!


I remember I ran into this problem before as well, but that was about 
 and .  I remember when I used




it didn't work but when changed to:



it worked all fine.  BUT WHY 

are these differences in tal documented somewhere? I would be glad if I 
knew them before-hand.


anyway, Thanks to Darryl, I am happy again now!

Regards,
Hassan

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


Re: [Zope3-Users] zpt pages though ZMI

2006-09-24 Thread Darryl Cousins
Hi Hassan,

On Mon, 2006-09-25 at 14:54 +0900, Hassan Alirezaei wrote:
> Hi again Darryl,
> 
> just to check something real quick,
> 
> does Boston skin really check for authenticated principals???

Ooops. No. Sorry for that.

In my own skin I'm using 

User

with no problem for either zcml principals nor pau principals.

Regards,
Darryl

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


Re: [Zope3-Users] zpt pages though ZMI

2006-09-23 Thread Hassan Alirezaei

Hi again Darryl,

just to check something real quick,

does Boston skin really check for authenticated principals??? I checked 
the main template and it looks like Boston is getting the 
request/principal/title in the same way as every other skin:



   
 
   User:
   User
 
 
   
 
   
 
   

I could render the page with a ZCML principal but not a PAU principal. 
is it at all possible to do that? I think it is but I just don't can't 
the grip to it.


any gurus out there??? :)

regards,Hass


Hassan Alirezaei wrote:

Thanks Darryl

you were right about the title attribute of unauthenticated 
principals. they don't have it.

I made another ZCML principal with a title and it works fine.

The problem still remains the same though for the principals in the 
PAU. I always thought they do have a "title" bacause it is shown on 
"ordinary pages" when you login. ( well unauthenticated principals 
also show up :) )


I checked it with Boston skin. The principal title gets rendered but 
there is again another problem with some "econtext.view" that messes 
everything up again. I will try to figure that out or just borrow the 
request/principal/title part from boston skin and hang with my own 
skin which I like better.


Thanks again



Darryl Cousins wrote:

Hi,

Your problem is
in /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt and
UnauthenticatedPrincipal does not have attribute 'title'.

Check Boston skin template which first tests for authenticated user
before calling request/principal/title.

Regards,
Darryl

On Sun, 2006-09-24 at 19:43 +0900, Hassan Alirezaei wrote:
 

Hello everyone,

Does anyone know the easiest way to let people (principals of a 
site) develop their own pages with no knowledge about zop3 
structure? AFAIK The users need to make their own pages with HTML 
(more generally ZPT) and upload them as a ZPT page.


I dont want my whole website skin to disappear so I use the 
context/@@standard_macros/page for the zpt page.


when I add it, the page renders fine for the Manager(ZCML) but not 
for other principals, apparently the title for each principal can 
not be traversed.


this is my zpt page which I upload through the ZMI as Manager:


 





 




and here is the error:
--- 

  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/tales.py", 
line 696, in evaluate

return expression(self)
   - /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt
   - Line 59, Column 36
   - Expression: 
   - Names:
  {'args': (),
   'container': 0xb50880ac>,

   'context': ,
   'default': ,
   'loop': {},
   'nothing': None,
   'options': {},
   'repeat': {},
   'request': URL=http://124.102.91.194:8080/ZPTPage>,
   'template': 0xb50885ec>,
   'usage': at 0xb503654c>}
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", line 
217, in __call__

return self._eval(econtext)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", line 
194, in _eval

ob = self._subexprs[-1](econtext)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", line 
124, in _eval

ob = self._traverser(ob, element, econtext)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
line 68, in __call__

request=request)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 164, in traversePathElement

return traversable.traverse(nm, further_path)
   - __traceback_info__: 
(object at 0xb7390b6c>, 'title')
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 52, in traverse

raise TraversalError(subject, name)
   - __traceback_info__: 
(object at 0xb7390b6c>, 'title', [])
TraversalError: 
(object at 0xb7390b6c>, 'title')


--- 






Not is this the expected behavior or am I doing something wrong???

thanks for any help.
Hass







___
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 mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zpt pages though ZMI

2006-09-23 Thread Hassan Alirezaei

Thanks Darryl

you were right about the title attribute of unauthenticated principals. 
they don't have it.

I made another ZCML principal with a title and it works fine.

The problem still remains the same though for the principals in the PAU. 
I always thought they do have a "title" bacause it is shown on "ordinary 
pages" when you login. ( well unauthenticated principals also show up :) )


I checked it with Boston skin. The principal title gets rendered but 
there is again another problem with some "econtext.view" that messes 
everything up again. I will try to figure that out or just borrow the 
request/principal/title part from boston skin and hang with my own skin 
which I like better.


Thanks again



Darryl Cousins wrote:

Hi,

Your problem is
in /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt and
UnauthenticatedPrincipal does not have attribute 'title'.

Check Boston skin template which first tests for authenticated user
before calling request/principal/title.

Regards,
Darryl

On Sun, 2006-09-24 at 19:43 +0900, Hassan Alirezaei wrote:
  

Hello everyone,

Does anyone know the easiest way to let people (principals of a site) 
develop their own pages with no knowledge about zop3 structure? AFAIK 
The users need to make their own pages with HTML (more generally ZPT) 
and upload them as a ZPT page.


I dont want my whole website skin to disappear so I use the 
context/@@standard_macros/page for the zpt page.


when I add it, the page renders fine for the Manager(ZCML) but not for 
other principals, apparently the title for each principal can not be 
traversed.


this is my zpt page which I upload through the ZMI as Manager:









and here is the error:
---
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/tales.py", line 
696, in evaluate

return expression(self)
   - /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt
   - Line 59, Column 36
   - Expression: 
   - Names:
  {'args': (),
   'container': ,
   'context': ,
   'default': ,
   'loop': {},
   'nothing': None,
   'options': {},
   'repeat': {},
   'request': URL=http://124.102.91.194:8080/ZPTPage>,

   'template': ,
   'usage': 0xb503654c>}
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 217, in __call__

return self._eval(econtext)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 194, in _eval

ob = self._subexprs[-1](econtext)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 124, in _eval

ob = self._traverser(ob, element, econtext)
  File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
line 68, in __call__

request=request)
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 164, in traversePathElement

return traversable.traverse(nm, further_path)
   - __traceback_info__: 
(0xb7390b6c>, 'title')
  File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 52, in traverse

raise TraversalError(subject, name)
   - __traceback_info__: 
(0xb7390b6c>, 'title', [])
TraversalError: 
(0xb7390b6c>, 'title')


---




Not is this the expected behavior or am I doing something wrong???

thanks for any help.
Hass







___
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] zpt pages though ZMI

2006-09-23 Thread Darryl Cousins
Hi,

Your problem is
in /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt and
UnauthenticatedPrincipal does not have attribute 'title'.

Check Boston skin template which first tests for authenticated user
before calling request/principal/title.

Regards,
Darryl

On Sun, 2006-09-24 at 19:43 +0900, Hassan Alirezaei wrote:
> Hello everyone,
> 
> Does anyone know the easiest way to let people (principals of a site) 
> develop their own pages with no knowledge about zop3 structure? AFAIK 
> The users need to make their own pages with HTML (more generally ZPT) 
> and upload them as a ZPT page.
> 
> I dont want my whole website skin to disappear so I use the 
> context/@@standard_macros/page for the zpt page.
> 
> when I add it, the page renders fine for the Manager(ZCML) but not for 
> other principals, apparently the title for each principal can not be 
> traversed.
> 
> this is my zpt page which I upload through the ZMI as Manager:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> and here is the error:
> ---
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/tales.py", line 
> 696, in evaluate
> return expression(self)
>- /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt
>- Line 59, Column 36
>- Expression: 
>- Names:
>   {'args': (),
>'container': ,
>'context': ,
>'default': ,
>'loop': {},
>'nothing': None,
>'options': {},
>'repeat': {},
>'request':  URL=http://124.102.91.194:8080/ZPTPage>,
>'template': ,
>'usage':  0xb503654c>}
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
> line 217, in __call__
> return self._eval(econtext)
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
> line 194, in _eval
> ob = self._subexprs[-1](econtext)
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
> line 124, in _eval
> ob = self._traverser(ob, element, econtext)
>   File 
> "/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
> line 68, in __call__
> request=request)
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
> line 164, in traversePathElement
> return traversable.traverse(nm, further_path)
>- __traceback_info__: 
> ( 0xb7390b6c>, 'title')
>   File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
> line 52, in traverse
> raise TraversalError(subject, name)
>- __traceback_info__: 
> ( 0xb7390b6c>, 'title', [])
> TraversalError: 
> ( 0xb7390b6c>, 'title')
> 
> ---
> 
> 
> 
> 
> Not is this the expected behavior or am I doing something wrong???
> 
> thanks for any help.
> Hass
> 
> 
> 
> 
> 
> 
> 
> ___
> 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] zpt pages though ZMI

2006-09-23 Thread Hassan Alirezaei

Hello everyone,

Does anyone know the easiest way to let people (principals of a site) 
develop their own pages with no knowledge about zop3 structure? AFAIK 
The users need to make their own pages with HTML (more generally ZPT) 
and upload them as a ZPT page.


I dont want my whole website skin to disappear so I use the 
context/@@standard_macros/page for the zpt page.


when I add it, the page renders fine for the Manager(ZCML) but not for 
other principals, apparently the title for each principal can not be 
traversed.


this is my zpt page which I upload through the ZMI as Manager:









and here is the error:
---
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/tales.py", line 
696, in evaluate

   return expression(self)
  - /home/hassan/HOMEPAGE2/modules/ISI/skin/template_tablelayout.pt
  - Line 59, Column 36
  - Expression: 
  - Names:
 {'args': (),
  'container': ,
  'context': ,
  'default': ,
  'loop': {},
  'nothing': None,
  'options': {},
  'repeat': {},
  'request': URL=http://124.102.91.194:8080/ZPTPage>,

  'template': ,
  'usage': 0xb503654c>}
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 217, in __call__

   return self._eval(econtext)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 194, in _eval

   ob = self._subexprs[-1](econtext)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/tales/expressions.py", 
line 124, in _eval

   ob = self._traverser(ob, element, econtext)
 File 
"/usr/local/Zope-3.3.0c1/lib/python/zope/app/pagetemplate/engine.py", 
line 68, in __call__

   request=request)
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 164, in traversePathElement

   return traversable.traverse(nm, further_path)
  - __traceback_info__: 
(0xb7390b6c>, 'title')
 File "/usr/local/Zope-3.3.0c1/lib/python/zope/traversing/adapters.py", 
line 52, in traverse

   raise TraversalError(subject, name)
  - __traceback_info__: 
(0xb7390b6c>, 'title', [])
TraversalError: 
(0xb7390b6c>, 'title')


---




Not is this the expected behavior or am I doing something wrong???

thanks for any help.
Hass







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