Re: What I'd like to see gsoc achieve: plone distributions

Asko Soukka <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
> Dylan Jay <djay-n0pU0XVUApFWk0Htik3J/[email protected]> kirjoitti 2.4.2015 kello 13.38:
>> Context portlet configuration (with inheritance and blocking) is still something, which cannot be fully solved with Diazo. Even blocks / deco / mosaic is still lacking missing that.
> 
> Not sure what you mean. I thought you we were just talking about legacy portlets which include ZPT in them?

I mean that legacy portlet is currently the only existing and working way to implement new portlets TTW, and portal_skins/custom is the only reasonable place for their ZPT (because portal root would be even worse).


>>>> I did an experimental branch, where you can define restricted python view methods for fragment views:
>>>> 
>>>> https://github.com/collective/collective.themefragments/commit/75c194b26a5dd9a3827c2d43876042fb3cd860c2
>>> 
>>> Can you call python directly from diazo?
>> 
>> I hope not. Why would you want to?
> 
> Let's say I want to do
> 
> <replace content=".lastupdated" href="@@lastupdatedview" />

Injecting plain text strings felt a rare special case for me, but of course, it could be made to work similarly to ZPT-fragements (@@theme-fragments/foobar now, maybe @@ttw/foobar later, if Eric agrees with the themefragments implementation).

> I think if we could get it as close to a view as possible it would make things much less confusing for a user. Having one way to do things TTW and another on the FS is just painful all round.

I'm not convinced yet. TTW is different environment and has different audience than FS. I'm not trying to convert FS-developers to TTW or otherway around. Forcing class + method -definitions in TTW adds mandatory boilerplate and two indenting levels before your the actual code. I cannot see it making TTW any more popular.

Also, I'd prefer to stay within the limits of restricted python (no importing [or need to remember where to import from] BrowserView).

Instead, I think, I should fix the current implementation to provide all the same script locals as legacy PythonScripts (in addition to the currently provided "self", when called through ZPT-fragment view).

Regards,
Asko
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.