[web2py:25615] Re: xhtml vs html

2009-07-03 Thread Jonathan Lundell

On Jul 3, 2009, at 8:20 PM, mdipierro wrote:

>
> You clearly know about this more than I do.

I'm hoping there are people on this list who know more than either of  
us.

> For legacy issues we cannot change the content-type: text.html but we
> can change the  in the scaffolding app.

I ask only out of curiosity: who's relying on the content-type? (Are  
we talking about the meta tag here?)

Another question: why do I see xhtml strict on the example page 
, but xhtml transitional when I run web2py locally?

> As long as there are no major objections I say we should follow your
> advice.
> I look forward to your html patches. ;-)

I have the glimmerings of an idea

>
> Massimo
>
> On Jul 3, 9:19 pm, Jonathan Lundell  wrote:
>> By way of background, web2py generates xhtml pages, with these
>> doctypes (I'm not clear on why one or the other is chosen; perhaps
>> someone could enlighten me):
>>
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
>> ">
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
>> "
>>
>> The problem is, web2py's xhtml is not, by and large, valid. This  
>> ought
>> to cause a problem, because xhtml parsers aren't allowed to handle
>> invalid markup. We get away with it because essentially all servers
>> present our pages as html, not xhtml, and our browsers parse it as
>> html, which is more forgiving.
>>
>> (One of the better explanations of all this is: 
>> >  >.)
>>
>> Here's an illustration. With a standards-compliant browser (I'm using
>> Safari 4.0.1 and Firefox 3.5 on OS X), have a look at these pages:
>>
>> http://www.web2py.com/examples/spreadsheethttp://lobitos.net/w2p/w2p.htmlhttp://lobitos.net/w2p/w2p.xhtml
>>
>> They're identical (I copied the first one, changing only some URLs to
>> be absolute instead of relative). You should see that your browser
>> won't display the third version.
>>
>> Why? Because the first two are served as "Content-Type: text/html",
>> while the third is served as "Content-Type: application/xhtml+xml".
>> This is how Apache handles .html and .xhtml files by default. Notice
>> that the browser pays attention to the Content-Type header and  
>> ignores
>> the DOCTYPE (the w3 validator looks at DOCTYPE, though). Notice also
>> that the browser is ignoring the "> content="text/html; charset=utf-8" />" line; it really does believe
>> the http header: not the doctype, not the meta.
>>
>> So. Why use the XHTML DOCTYPE? The main reason that I can think of is
>> that the resulting document, if valid, has a DTD and can be parsed as
>> XML. Not by the browser, which is going to parse it as bad html, but
>> by someone else, maybe. But that reason only holds water if the
>> document is actually *valid* xhtml.
>>
>> (Another note: this is the spreadsheet application, but the same  
>> thing
>> would happen with many, perhaps most, web2py pages, certainly any  
>> with
>> . You can try the same experiment with other pages.)
>>
>> What to do? In my view, there's a short-term answer and a long-term
>> answer. And they're both complicated by legacy compatibility issues,
>> which I'll take the liberty of ignoring here.
>>
>> In the short term, fix the output to be valid XHTML. This is easier  
>> if
>> you use transitional rather than strict.
>>
>> In the long term, move to HTML. Given that it looks like XHTML2 has
>> been abandoned, the future standard is going to be HTML5. Not very
>> soon, since browsers are only starting to support it, and the FSM  
>> only
>> knows when Microsoft will get around to it, but eventually, since
>> HTML5 has a lot of nifty features.
>>
>> Me, I've settled on HTML4 Transitional for anything I've got control
>> over, using XHTML only for a couple of pages that I need to parse as
>> XML.
> >



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25614] second life users?

2009-07-03 Thread mdipierro

I made a Second Life gadget that can talk to web2py so you can write a
web2py app to talk to people in Second Life. If anybody is interested
let me know.

Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25613] Re: eStore appliance

2009-07-03 Thread mdipierro

Not sure that works. I never tried it. eStore works with google
checkout and that is more solid than paypal

massimo

On Jul 3, 11:20 pm, suiato  wrote:
> just restarted to work on eStore yesterday, trying to use it as a
> reference for one of my projects.
> it's a good and useful example for me to learn translation and system
> in web2py.
>
> Google checkout for merchants is still not available in countries
> other than US and UK, though its application pages now appear here in
> Japanese...
>
> Found an appliance PayPal Engine by Matt Sellers 
> athttp://mdp.cti.depaul.edu/appliances.
> Could be integrated into eStore?
>
> eStore may be old and need a lot of work to be a full-fledged e-
> commerce appliance. It'd be nice to have it that way,
> but there's another interest in removing fluffy parts and trimming
> down to its skeleton. This way, logics will be revealed
> more clearly, easy to understand the structure, and easy to extend it
> as necessary.
>
> Dreaming a dream of the skeletal eStore to be applied to various
> devices like iPhone, mobiles, PDA and others without changing its
> logical core...
>
> --
> Teru
>
> On 7月4日, 午前1:41, mdipierro  wrote:
>
> > eStoreis now an old app. It needs lots of work.
>
> > Massimo
>
> > On Jul 3, 11:36 am, mingodad  wrote:
>
> > > I was caught too by the error messages "too small or too large"
> > > I sugest to add the folowing to the css part on layout.html:
>
> > > .error { background-color: red; color: white; padding: 3px }
>
> > > It was borroed from T3, this way the error messages will not pass
> > > unnoticed.
>
> > > As well I'm intrigged why the *_bc fields doesn't get the default
> > > values like the others !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25612] Re: web2py function to pretty-print HTML (for insertion into AMY or TEXTAREA)?

2009-07-03 Thread dlypka

I found BeautifulSoup to do it.

On Jul 3, 9:51 am, dlypka  wrote:
> If I load some raw HTML into  eamy or a simple TEXTAREA, I need to
> have it pretty-printed first, to avoid the long lines which mess up
> the display.
> I see there are various python libaries to do this.
>
> But does web2py already have such a function somewhere? I see the CODE
> widget, but it does coloring but I don't see it doing a pretty-print.
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25611] Re: eStore appliance

2009-07-03 Thread suiato

just restarted to work on eStore yesterday, trying to use it as a
reference for one of my projects.
it's a good and useful example for me to learn translation and system
in web2py.

Google checkout for merchants is still not available in countries
other than US and UK, though its application pages now appear here in
Japanese...

Found an appliance PayPal Engine by Matt Sellers at 
http://mdp.cti.depaul.edu/appliances.
Could be integrated into eStore?

eStore may be old and need a lot of work to be a full-fledged e-
commerce appliance. It'd be nice to have it that way,
but there's another interest in removing fluffy parts and trimming
down to its skeleton. This way, logics will be revealed
more clearly, easy to understand the structure, and easy to extend it
as necessary.

Dreaming a dream of the skeletal eStore to be applied to various
devices like iPhone, mobiles, PDA and others without changing its
logical core...

--
Teru


On 7月4日, 午前1:41, mdipierro  wrote:
> eStoreis now an old app. It needs lots of work.
>
> Massimo
>
> On Jul 3, 11:36 am, mingodad  wrote:
>
> > I was caught too by the error messages "too small or too large"
> > I sugest to add the folowing to the css part on layout.html:
>
> > .error { background-color: red; color: white; padding: 3px }
>
> > It was borroed from T3, this way the error messages will not pass
> > unnoticed.
>
> > As well I'm intrigged why the *_bc fields doesn't get the default
> > values like the others !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25610] Re: xhtml vs html

2009-07-03 Thread mdipierro

You clearly know about this more than I do.
For legacy issues we cannot change the content-type: text.html but we
can change the  in the scaffolding app.
As long as there are no major objections I say we should follow your
advice.
I look forward to your html patches. ;-)

Massimo

On Jul 3, 9:19 pm, Jonathan Lundell  wrote:
> By way of background, web2py generates xhtml pages, with these  
> doctypes (I'm not clear on why one or the other is chosen; perhaps  
> someone could enlighten me):
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
> ">
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> "
>
> The problem is, web2py's xhtml is not, by and large, valid. This ought  
> to cause a problem, because xhtml parsers aren't allowed to handle  
> invalid markup. We get away with it because essentially all servers  
> present our pages as html, not xhtml, and our browsers parse it as  
> html, which is more forgiving.
>
> (One of the better explanations of all this is: 
>   >.)
>
> Here's an illustration. With a standards-compliant browser (I'm using  
> Safari 4.0.1 and Firefox 3.5 on OS X), have a look at these pages:
>
> http://www.web2py.com/examples/spreadsheethttp://lobitos.net/w2p/w2p.htmlhttp://lobitos.net/w2p/w2p.xhtml
>
> They're identical (I copied the first one, changing only some URLs to  
> be absolute instead of relative). You should see that your browser  
> won't display the third version.
>
> Why? Because the first two are served as "Content-Type: text/html",  
> while the third is served as "Content-Type: application/xhtml+xml".  
> This is how Apache handles .html and .xhtml files by default. Notice  
> that the browser pays attention to the Content-Type header and ignores  
> the DOCTYPE (the w3 validator looks at DOCTYPE, though). Notice also  
> that the browser is ignoring the " content="text/html; charset=utf-8" />" line; it really does believe  
> the http header: not the doctype, not the meta.
>
> So. Why use the XHTML DOCTYPE? The main reason that I can think of is  
> that the resulting document, if valid, has a DTD and can be parsed as  
> XML. Not by the browser, which is going to parse it as bad html, but  
> by someone else, maybe. But that reason only holds water if the  
> document is actually *valid* xhtml.
>
> (Another note: this is the spreadsheet application, but the same thing  
> would happen with many, perhaps most, web2py pages, certainly any with  
> . You can try the same experiment with other pages.)
>
> What to do? In my view, there's a short-term answer and a long-term  
> answer. And they're both complicated by legacy compatibility issues,  
> which I'll take the liberty of ignoring here.
>
> In the short term, fix the output to be valid XHTML. This is easier if  
> you use transitional rather than strict.
>
> In the long term, move to HTML. Given that it looks like XHTML2 has  
> been abandoned, the future standard is going to be HTML5. Not very  
> soon, since browsers are only starting to support it, and the FSM only  
> knows when Microsoft will get around to it, but eventually, since  
> HTML5 has a lot of nifty features.
>
> Me, I've settled on HTML4 Transitional for anything I've got control  
> over, using XHTML only for a couple of pages that I need to parse as  
> XML.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25609] xhtml vs html

2009-07-03 Thread Jonathan Lundell

By way of background, web2py generates xhtml pages, with these  
doctypes (I'm not clear on why one or the other is chosen; perhaps  
someone could enlighten me):

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd 
">
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
"

The problem is, web2py's xhtml is not, by and large, valid. This ought  
to cause a problem, because xhtml parsers aren't allowed to handle  
invalid markup. We get away with it because essentially all servers  
present our pages as html, not xhtml, and our browsers parse it as  
html, which is more forgiving.

(One of the better explanations of all this is: 
.)

Here's an illustration. With a standards-compliant browser (I'm using  
Safari 4.0.1 and Firefox 3.5 on OS X), have a look at these pages:

http://www.web2py.com/examples/spreadsheet
http://lobitos.net/w2p/w2p.html
http://lobitos.net/w2p/w2p.xhtml

They're identical (I copied the first one, changing only some URLs to  
be absolute instead of relative). You should see that your browser  
won't display the third version.

Why? Because the first two are served as "Content-Type: text/html",  
while the third is served as "Content-Type: application/xhtml+xml".  
This is how Apache handles .html and .xhtml files by default. Notice  
that the browser pays attention to the Content-Type header and ignores  
the DOCTYPE (the w3 validator looks at DOCTYPE, though). Notice also  
that the browser is ignoring the "" line; it really does believe  
the http header: not the doctype, not the meta.

So. Why use the XHTML DOCTYPE? The main reason that I can think of is  
that the resulting document, if valid, has a DTD and can be parsed as  
XML. Not by the browser, which is going to parse it as bad html, but  
by someone else, maybe. But that reason only holds water if the  
document is actually *valid* xhtml.

(Another note: this is the spreadsheet application, but the same thing  
would happen with many, perhaps most, web2py pages, certainly any with  
. You can try the same experiment with other pages.)

What to do? In my view, there's a short-term answer and a long-term  
answer. And they're both complicated by legacy compatibility issues,  
which I'll take the liberty of ignoring here.

In the short term, fix the output to be valid XHTML. This is easier if  
you use transitional rather than strict.

In the long term, move to HTML. Given that it looks like XHTML2 has  
been abandoned, the future standard is going to be HTML5. Not very  
soon, since browsers are only starting to support it, and the FSM only  
knows when Microsoft will get around to it, but eventually, since  
HTML5 has a lot of nifty features.

Me, I've settled on HTML4 Transitional for anything I've got control  
over, using XHTML only for a couple of pages that I need to parse as  
XML.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25608] Re: need an ajax spreadsheet

2009-07-03 Thread mdipierro



On Jul 3, 7:33 pm, Jonathan Lundell  wrote:
> On Jul 3, 2009, at 5:26 PM, mdipierro wrote:
>
> > Thank you. I will fix this as soon as I have time although this is not
> > a priority since it is only an example app BUT if you find other
> > similar problems in admin or examples or welcome and could submit a
> > patch that would be excellent.
>
> Glad to.
>
> Do you have an established format and procedure for patches?

I can summarize the procedure this way:
0) check on the mailing list that a patch is necessary
1) email me the patch to save time
2) you there is no action in 24 posted it on google code

> Also, I note that the issue of the empty form action   
> for self-submission came up on this list back in IIRC January of this  
> year. It's too bad it's not legal, since interpretation as self-
> submission would be reasonable, and in fact all browsers so interpret  
> it. But it won't verify.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25607] Re: need an ajax spreadsheet

2009-07-03 Thread Jonathan Lundell

On Jul 3, 2009, at 5:26 PM, mdipierro wrote:

> Thank you. I will fix this as soon as I have time although this is not
> a priority since it is only an example app BUT if you find other
> similar problems in admin or examples or welcome and could submit a
> patch that would be excellent.

Glad to.

Do you have an established format and procedure for patches?

Also, I note that the issue of the empty form action   
for self-submission came up on this list back in IIRC January of this  
year. It's too bad it's not legal, since interpretation as self- 
submission would be reasonable, and in fact all browsers so interpret  
it. But it won't verify.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:25606] Re: need an ajax spreadsheet

2009-07-03 Thread mdipierro

Thank you. I will fix this as soon as I have time although this is not
a priority since it is only an example app BUT if you find other
similar problems in admin or examples or welcome and could submit a
patch that would be excellent.

Massimo

On Jul 3, 7:19 pm, Jonathan Lundell  wrote:
> On Jul 3, 2009, at 4:55 PM, mdipierro wrote:
>
>
>
> > Actually we try be compliant. whete is the empty form? there should
> > not be any.
>
> Here's the entire 
> report:http://validator.w3.org/check?uri=http://www.web2py.com/examples/spre...
>
> Among other things, the  tag requires a valid type, and the  
> 
tag requires a (non-empty) action. > > > > > On Jul 3, 6:17 pm, Jonathan Lundell wrote: > >> On Jul 3, 2009, at 1:48 PM, mdipierro wrote: > > >>> with that looks like this:http://www.web2py.com/examples/spreadsheet > > >> I'm new to the web2py game, so pardon me if this is a settled   > >> question. > > >> I'm wondering whether you wouldn't want to try to do stuff like this > >> in an (x)html-compliant manner. Neither an empty nor an empty > >>