Re: [Zope3-Users] Re: Empty ZCML file
On Mon, 2007-01-15 at 22:31 +, Martin Aspeli wrote: > Michael Bernstein wrote: > > As I experiment with Zope3 skins, I frequently have various > > *-overrides.zcml files I am using to switch the default skin. I tried > > today to comment out the only directive I had in one file (ie. like so: > > ), and this caused > > an error. > > > > So, it looks like Zope does not like content-free ZCML files. Bug or > > Feature? > > > > Having to move the file isn't a problem, exactly, but it is annoying. > > You should always have the .. directive; you > can comment out what's in-between. Ah, OK. Thanks! I've seen plenty of examples of bare directives (and they obviously work). Aside from the issue I had, is this not considered a good practice? - Michael R. Bernstein michaelbernstein.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Empty ZCML file
Michael Bernstein wrote: As I experiment with Zope3 skins, I frequently have various *-overrides.zcml files I am using to switch the default skin. I tried today to comment out the only directive I had in one file (ie. like so: ), and this caused an error. So, it looks like Zope does not like content-free ZCML files. Bug or Feature? Having to move the file isn't a problem, exactly, but it is annoying. You should always have the .. directive; you can comment out what's in-between. Martin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Empty ZCML file
As I experiment with Zope3 skins, I frequently have various *-overrides.zcml files I am using to switch the default skin. I tried today to comment out the only directive I had in one file (ie. like so: ), and this caused an error. So, it looks like Zope does not like content-free ZCML files. Bug or Feature? Having to move the file isn't a problem, exactly, but it is annoying. - Michael R. Bernstein michaelbernstein.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Zope 3.3.1
Jegenye 2001 Bt (Miklós Prisznyák) wrote: 2007/1/14, Stephan Richter <[EMAIL PROTECTED]>: Zope 3.3.1 was released today. Unfortunately I cannot access wiki.zope.org right now to get you the release link. http://wiki.zope.org/zope3/Zope331 However there's no downloadable for v3.3.1 at http://zope.org/Products/Zope3 yet at the moment. It seems they've found a failing test so probably that's why. Oh, but that means it is close. : ) Robert ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: question about request.locale and creation time
I tried solving this problem as follows. Don't know if its the best solution, but works for me as my application is meant only for Intranet environments. - I subclassed zope.app.container.browser.contents.Contents. - In the subclass I overrided _*extractContentInfo *method - Created a LocalTimezone class as described in Python manual by subclassing tzinfo - Converted the created and modifed datetime objects from dublin-core information to local time zone - Used this class to create the Container views The time information looks now fine for me. Is there any better way? With regards, -Shailesh On 1/15/07, Shailesh Kumar <[EMAIL PROTECTED]> wrote: Sorry, the mail went only to Philipp by mistake. Hi Philipp, Thanx for the pointers. I went through the sections of your book regarding this. I guess I now understand my problem better. The problem is about the time-zone and not about formatting. The Creation and Modification time stamps seem to be the UTC time stamps, and I want the display to be according to local time zone. How can I do it? With regards, -Shailesh On 1/14/07, Philipp von Weitershausen <[EMAIL PROTECTED] > wrote: > > > > Shailesh Kumar wrote: > > Hi, > > > > When I look at the Creation time and Modification time in any of the > > container views, it shows me the UTC time. > > > > Looking at > > zope.app.container.browser.contents.py > > < http://zope.app.container.browser.contents.py>: Line 174 > > > > I found that: > > > > formatter = self.request.locale.dates.getFormatter( > > 'dateTime', 'short') > > > > created = self.safe_getattr(dc, 'created', None) > > if created is not None: > > info['created'] = formatter.format(created) > > > > modified = self.safe_getattr(dc, 'modified', None) > > if modified is not None: > > info['modified'] = formatter.format(modified) > > > > is being used to compute them. > > No, the local formatter is used to *format* dates according to the > current locale. 8th of March this year, for example would be "3/8/2007" > in the U.S. English locale, but "08.03.2007" in the German locale. > > > I am puzzled, how does the browser set its locale? I guess this must > be > > a very basic question. But I am not able to figure it out. > > request.locale is set according to the most preferred language/locale > returned by the IUserPreferredLanguages adapter for the request. The > default adapter reads browser's the Accept-Language header. More > advanced adapters could use cookies or something else that the user can > influence though the website directly. > > My book talks about this in detail: http://worldcookery.com > > > -- > http://worldcookery.com -- Professional Zope documentation and training > 2nd edition of Web Component Development with Zope 3 is now shipping! > > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Content cloning ?
Hi, Am Montag, den 15.01.2007, 16:06 +0100 schrieb Thierry Florac: > Hi, > > In an application I'm currently building with Zope3, I need to be able > to "clone" several kinds of content data. > While cloning a simple content class is quite simple, I don't know > exactly how to clone data provided through adapters, which may store > these data throught annotations. > > What I was thinking about was something like : > - create a new interface "IClonable", with a single "clone" method > - make my specific content interfaces, eventually provided throught > adapters, extend IClonable > - get a list of interfaces provided by my content class, directly or > throught adapters, which extend IClonable, and call their "clone" method > when cloning is required. > > So, actually, my main problem is : > - how can I get the list of interfaces provided by a given class, > directly of throught adapters ? > - is this conception method the best one in Python/Zope3 to clone > data ?? > > Thanks for any help or advise... You might want to checkout zc.copy. Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Content cloning ?
Hi, In an application I'm currently building with Zope3, I need to be able to "clone" several kinds of content data. While cloning a simple content class is quite simple, I don't know exactly how to clone data provided through adapters, which may store these data throught annotations. What I was thinking about was something like : - create a new interface "IClonable", with a single "clone" method - make my specific content interfaces, eventually provided throught adapters, extend IClonable - get a list of interfaces provided by my content class, directly or throught adapters, which extend IClonable, and call their "clone" method when cloning is required. So, actually, my main problem is : - how can I get the list of interfaces provided by a given class, directly of throught adapters ? - is this conception method the best one in Python/Zope3 to clone data ?? Thanks for any help or advise... Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : [EMAIL PROTECTED] Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Fwd: question about request.locale and creation time
Sorry, the mail went only to Philipp by mistake. Hi Philipp, Thanx for the pointers. I went through the sections of your book regarding this. I guess I now understand my problem better. The problem is about the time-zone and not about formatting. The Creation and Modification time stamps seem to be the UTC time stamps, and I want the display to be according to local time zone. How can I do it? With regards, -Shailesh On 1/14/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Shailesh Kumar wrote: > Hi, > > When I look at the Creation time and Modification time in any of the > container views, it shows me the UTC time. > > Looking at > zope.app.container.browser.contents.py > < http://zope.app.container.browser.contents.py>: Line 174 > > I found that: > > formatter = self.request.locale.dates.getFormatter( > 'dateTime', 'short') > > created = self.safe_getattr(dc, 'created', None) > if created is not None: > info['created'] = formatter.format(created) > > modified = self.safe_getattr(dc, 'modified', None) > if modified is not None: > info['modified'] = formatter.format(modified) > > is being used to compute them. No, the local formatter is used to *format* dates according to the current locale. 8th of March this year, for example would be "3/8/2007" in the U.S. English locale, but "08.03.2007" in the German locale. > I am puzzled, how does the browser set its locale? I guess this must be > a very basic question. But I am not able to figure it out. request.locale is set according to the most preferred language/locale returned by the IUserPreferredLanguages adapter for the request. The default adapter reads browser's the Accept-Language header. More advanced adapters could use cookies or something else that the user can influence though the website directly. My book talks about this in detail: http://worldcookery.com -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3.3.1
2007/1/14, Stephan Richter <[EMAIL PROTECTED]>: Zope 3.3.1 was released today. Unfortunately I cannot access wiki.zope.org right now to get you the release link. http://wiki.zope.org/zope3/Zope331 However there's no downloadable for v3.3.1 at http://zope.org/Products/Zope3 yet at the moment. It seems they've found a failing test so probably that's why. -- Best regards, Miklós Prisznyák Principal Consultant, owner http://www.jegenye.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Blog for Zope3
Florian Lindner wrote: > > Hello, > is there a blog package for Zope3? It doesn't need to mature just usable > would > be ok... > grokblog is a demo app for grok, shipping with grok's buildout. I'm sure it's not that mature yet, but it may be a great way to get into grok :) Martin -- View this message in context: http://www.nabble.com/Blog-for-Zope3-tf3010389.html#a8370456 Sent from the Zope3 - users mailing list archive at Nabble.com. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Blog for Zope3
On Mon, Jan 15, 2007 at 12:33:52AM +0100, Christophe Combelles wrote: > I'm currently playing with zblog. It's very basic, you can just add blog > entries as text and display them. But it's a good starting point and I'm > currently adding category management. Surely you mean tags! *ducks* Marius Gedminas -- No proper program contains an indication which as an operator-applied occurrence identifies an operator-defining occurrence which as an indication-applied occurrence identifies an indication-defining occurrence different from the one identified by the given indication as an indication-applied occurrence. -- ALGOL 68 Report signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users