Re: [Zope-dev] How to put "<", ">" in HTML attributes?

2008-08-20 Thread Christian Theune
On Wed, 2008-08-20 at 19:34 +0200, Hermann Himmelbauer wrote:
> Hi,
> I have a page template, that should have the characters "<" and ">" in the 
> resulting HTML code, e.g.:
> 
> 
> 
> Zope3 makes a < / &rt; out of the "<>" characters:
> 
>  
> Is there a way to get around this automatic conversion? I tried it via:
> 
>  tal:attributes="value python:''" />
> 
> But this makes no difference.
> 
> Any clues?
> 
> Best Regards,
> Hermann
> 
> P.S.: I know, this seems to make no sense, but the page is a template for 
> another, foreign application, which needs this specific values as 
> placeholders and which I can not adapt...

My memory says and the HTML validator acknowledges it: this *is* broken.

PT is designed to not do that.

Here's how it *might* work:

Take a view that generates the broken HTML snippet, like:

class View:

   def code(self):
  return ''

And in your template do:



I didn't test it and I'm not sure it works. It might, though.

Christian

PS: This makes the little internet elves cry.

-- 
Christian Theune · [EMAIL PROTECTED]
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development


signature.asc
Description: This is a digitally signed message part
___
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] Failing Zope 2.8 / Python 2.3 tests on your box

2008-08-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan,

Tests are blowing up on that box becaues the 'encodings' module has no
attribute 'aliases':  AFAICT, that doesn't happen on a "standard" build
of Python:  is there something weird about your setup?


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

iD8DBQFIrFr++gerLs4ltQ4RArW6AKCKRbzeFvOkI8bWuJLHswuIYeMELQCfSLB0
a3pJHstsrL2JMsZXpJRJqUw=
=mAA8
-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 )


[Zope-dev] How to put "<", ">" in HTML attributes?

2008-08-20 Thread Hermann Himmelbauer
Hi,
I have a page template, that should have the characters "<" and ">" in the 
resulting HTML code, e.g.:



Zope3 makes a < / &rt; out of the "<>" characters:



But this makes no difference.

Any clues?

Best Regards,
Hermann

P.S.: I know, this seems to make no sense, but the page is a template for 
another, foreign application, which needs this specific values as 
placeholders and which I can not adapt...

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
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] zope.app.form: Make "no value" always available?

2008-08-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas Lotze wrote:
> Thomas Lotze wrote:
> 
>> Roger Ineichen wrote:
>>
>>> Since this is a miss behavior and I agree that this should get fixed. We
>>> probably should think about a solution which supports the old behavior
>>> by default.
>>>
>>> Note, this whould probably also break other packages like
>>> z3c.csvvocabulary.
>> We've thought about this some more. Our current suggestion is to
>> implement both behaviours using a class attribute for switching, with
>> the base class implementing the new, better one and a subclass setting
>> the attribute differently for BBB.
> 
> Oh well, it turns out that this doesn't really work well as the class in
> question is used as a base class by all the items edit widgets. The
> next-best approach we'd try would be a module-global flag that turns the
> old behaviour back on and must be set during application start-up for BBB.
> Would that be an acceptable solution?

+0 if you release it with a new "major" release number (i.e., 3.6.0),
and document clearly how to get the BBB behavior.  If you need to
release with a new "minor" number (i.e., 3.5.1), then the BBB behavior
must be the default.


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

iD8DBQFIrE7h+gerLs4ltQ4RAnkaAJ9BsGbe4fgbI04JvcFUZkZavp+NjACaA7Jg
D6yo37JOCEcKSt29Ht/Y3qY=
=RoWq
-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] zope.component: calling an Interface and calling queryAdapter give differing results

2008-08-20 Thread Marius Gedminas
On Tue, Aug 19, 2008 at 11:19:12PM +0100, Chris Withers wrote:
> However, how should I go about adapting an object to an interface where 
> there may or may not be an adapter registered?

obj = ISomething(otherobj, None)

> The natural way would seem to be:
> 
> obj = ISomething(otherobj,default=None)

I like this version.  It's much clearer.

> ...but I seem to remember people finding reasons why implementing that 
> would never be possible.

I think that was about making ISometing(foo, bar) do a multi-adapter
lookup instead of the current semantics (using bar as the default).

>  From a use point of view, I'd only expect queryAdapter to consider 
> looking for a named adapter if I actually provide a name. If I provide 
> no name, it would seem logical to look up a non-named adapter. If 
> looking up a non-named adapter, it would make sense if the object 
> already provides the desired interfaces to just return the object.
> 
> I'd love to see where this expectation is faulty...

It's also what I expected, and Jim managed to convince me I was wrong.
Well, almost.  I still think there's a smell if something doesn't work
the way people expect, even if it all seems very elegant after a long
protracted explanation.

FWIW, there's another difference between ISomething(foo) and
getAdapter(foo, ISomething):

class SampleObject(object):
def __conform__(self, iface):
if iface is ISomething:
return self.something

obj = SampleObject()
obj.something = SomethingElse()

ISomething(obj) will return obj.something.

getAdapter(obj, ISomething) will raise a ComponentLookupError.

Marius Gedminas
-- 
 yeah, i'm reading the answers, currently
 but what I see is that there is no real procedure to rebuild initfs
 the common way seems to use a loop device with a jffs2 filesystem, put
 original files there, and add other files, then umount, flash and pray
Corsac: You forgot "ritual sacrifice of a medium sized rodent".
 Without that, it'll never work.
And if it doesn't work the first time, re-adjust towel ordering in the
 restroom and try again
-- #maemo


signature.asc
Description: Digital 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] zope.app.form: Make "no value" always available?

2008-08-20 Thread Thomas Lotze
Thomas Lotze wrote:

> Roger Ineichen wrote:
> 
>> Since this is a miss behavior and I agree that this should get fixed. We
>> probably should think about a solution which supports the old behavior
>> by default.
>> 
>> Note, this whould probably also break other packages like
>> z3c.csvvocabulary.
> 
> We've thought about this some more. Our current suggestion is to
> implement both behaviours using a class attribute for switching, with
> the base class implementing the new, better one and a subclass setting
> the attribute differently for BBB.

Oh well, it turns out that this doesn't really work well as the class in
question is used as a base class by all the items edit widgets. The
next-best approach we'd try would be a module-global flag that turns the
old behaviour back on and must be set during application start-up for BBB.
Would that be an acceptable solution?

-- 
Thomas Lotze · [EMAIL PROTECTED]
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development


___
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: 4 OK, 1 Unknown

2008-08-20 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Tue Aug 19 11:00:00 2008 UTC to Wed Aug 20 11:00:00 2008 UTC.
There were 5 messages: 5 from Zope Tests.


Unknown
---

Subject: UNKNOWN : Zope-2.8 Python-2.3.6 : Linux
From: Zope Tests
Date: Tue Aug 19 20:42:17 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010035.html


Tests passed OK
---

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Tests
Date: Tue Aug 19 20:43:47 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010036.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Tests
Date: Tue Aug 19 20:45:17 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010037.html

Subject: OK : Zope-2.11 Python-2.4.4 : Linux
From: Zope Tests
Date: Tue Aug 19 20:46:47 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010038.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Tue Aug 19 20:48:18 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-August/010039.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 )


[Zope-dev] Bug in z3c.form.browser.orderedselect

2008-08-20 Thread Dan Korostelev
Hi, people!

In the OrederedSelectWidget's input template there's a little bug in
options displaying. Options (for selectedItems and notSelectedItems)
are displayed using expression like this (simplified):



Which will result in calling entry['content'] if it is callable, which
is true (for example) for the standard zope's "Content Types"
vocabulary from zope.app.content, because by default the term.value is
used for the "content" and then, if the term provides
ITitleTokenizedTerm it is replaced with translated term.title. But in
the "Content Types" vocabulary, terms are not titled, so term.value is
used, which is some Interface subclass and which is callable.

So, as far as I understand, to fix little issue, we need to add the
"nocall" modifier in the template, so option expression will look like
this (simplifed):



Thanks!

PS Is there any bug tracking system for z3c.form package (like zope's
general one on launchpad)?

--
WBR, Dan Korostelev
___
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 )