[Zope] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

Hi!

I'm using Zope 2.9.4 with Five1.4 (linux box).
I'm trying to use DateDisplayWidget (from 
/zope/app/form/browser/textwidgets.py)


I get:
*Error Type: AttributeError*
*Error Value: locale
...
Module Products.PageTemplates.Expressions, line 180, in _eval
Module Products.PageTemplates.Expressions, line 85, in render
Module zope.app.form.browser.textwidgets, line 538, in __call__
Module ZPublisher.HTTPRequest, line 1219, in __getattr__

Which is caused by this line:

formatter = self.request.locale.dates.getFormatter(
   self._category, (self.displayStyle or None))

So is this something with my Zope that I don't have request.locale
or is that a bug?

--
Maciej Wisniowski
*
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Martijn Pieters

On 9/5/06, Maciej Wisniowski [EMAIL PROTECTED] wrote:

I'm using Zope 2.9.4 with Five1.4 (linux box).
I'm trying to use DateDisplayWidget (from
/zope/app/form/browser/textwidgets.py)

[snip]

So is this something with my Zope that I don't have request.locale
or is that a bug?


I'd say it's a bug. The Zope3 request has the locale attribute, but
the Zope2 request implementation doesn't.

--
Martijn Pieters
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

 I'd say it's a bug. The Zope3 request has the locale attribute, but
 the Zope2 request implementation doesn't.
Yeah, I supposed that but was not sure. Thanks.

I've submitted an issue:

http://www.zope.org/Collectors/Zope/2184

--
Maciej Wisniowski
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Andreas Jung



--On 5. September 2006 15:35:36 +0200 Maciej Wisniowski 
[EMAIL PROTECTED] wrote:



  I'd say it's a bug. The Zope3 request has the locale attribute, but
  the Zope2 request implementation doesn't.
Yeah, I supposed that but was not sure. Thanks.

I've submitted an issue:

http://www.zope.org/Collectors/Zope/2184



That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker :-)

-aj

pgp9W8EwffH6b.pgp
Description: PGP signature
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski


That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker 
:-)


Why Zope 3? I'm using Zope 2.9.4. This code is ported
directly form Zope 3 or what?

--
Maciej Wisniowski
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Andreas Jung



--On 5. September 2006 15:49:46 +0200 Maciej Wisniowski 
[EMAIL PROTECTED] wrote:





That's basically a Zope 3 issue and belongs into the Zope 3 bugtracker
:-)


Why Zope 3? I'm using Zope 2.9.4. This code is ported
directly form Zope 3 or what?



The REQUEST in Zope 2 never had a 'locale' attribute and Zope 2 does not 
claim to be compatible with every kind of Zope 3 infrastructure. If 
request.locale is a very important feature in the Zope 3 world, one might 
backport this somehow to Zope 2 (if it makes sense). I consider this a 
feature request but not as a bug.


-aj

pgpAtCJXDstOS.pgp
Description: PGP signature
___
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] request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski

 I consider this a feature request but not as a bug.
Ehm... I'm not sure whether we understand each other.

I mean the bug is that DateDisplayWidget in Zope2.9.4 uses request.locale
which as you said is from Zope3 world. So, as far as I understand, reference
to 'request.locale' shouldn't appear in Zope 2.9.4 code at all but it 
does...

Do you mean it is correct??

--
Maciej Wisniowski
___
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 )