No reaction to including a four line big productivity booster into
web2py!
If not an enhanced BEAUTIFY class why not another BEAUTIFY class such
as BEAUTIFY2?
Surely at least an answer is merited, even if the answer is no!
Below is a copy of http://www.web2pyslices.com/main/slices/take_slice/58
On Feb 17, 12:07 am, John Heenan wrote:
> No reaction to including a four line big productivity booster into
> web2py!
Hi John,
Sorry no one commented! At least I looked at it, and liked it. But
Beautify is only a prototyping & testing thing for most so it's making
something prettier that no on
True. But surely better organised or prettier prototypes are
preferable when prototyping, as they gives a more realistic idea of a
final desired layout before the prettifiers get called in!
You can see the effect using just BEAUTIFY at
http://www.zgus.com/zgus/products/category_item/1
I don't ha
Sorry I did not comment. I think this this can be very useful but it
should not be a replacement for the current beautify. I think it is
important to leave the keys unchanged for debugging purposes. That is
what most people use BEAUTIFY for.
You should post a slice about the improved function and
The code I posted does not replace the normal behaviour of BEAUTIFY.
There is choice. In the four line example code I posted (which is from
a web2py slice) the keys are only changed if the second character is
an underscore.
I accept there is little enthusiasm. It is ironic because I think
there is
Thanks for your comments Thadeus. As mentioned to Massimo, the normal
behaviour of BEAUTIFY is not altered by the sample code.
John Heenan
On Feb 17, 1:08 pm, Thadeus Burgess wrote:
> I will say this, it is alot better, because you can hardly even tell
> it is a prototyping table, it could in ce
Let me take a second look...
On Feb 17, 5:53 am, John Heenan wrote:
> Thanks for your comments Thadeus. As mentioned to Massimo, the normal
> behaviour of BEAUTIFY is not altered by the sample code.
>
> John Heenan
>
> On Feb 17, 1:08 pm, Thadeus Burgess wrote:
>
> > I will say this, it is alot
I looked again.
You try to achieve two things:
1) As you say if the key starts with a_, this is removed. This is a
trick to make sure elements are sorted as you like them.
2) You capitalize the words and replace _ with spaces.
I think these are wrong solution to the problem. Look into trunk. The
Thanks Massimo
The keyfilter example you provided does not work but this one does
with the current BEAUTIFY in the trunk
keyfilter=lambda key=' '.join([x.capitalize() for x in
key[2:].split('_')]) if key[1]=='_' else key
A typical view file is now
{{extend 'layout.html'}}
{{=BEAUTIFY(response._v
This is a better keyfilter for the new BEAUTIFY than the one I
provided as it allows a key to be an empty string.
keyfilter=lambda key=' '.join([x.capitalize() for x in
key[2:].split('_')]) if key[1:2]=='_' else key
I have updated a web2py slice with information about using the new
BEAUTIFY at ht
Thank you John.
On Feb 18, 2:12 am, John Heenan wrote:
> This is a better keyfilter for the new BEAUTIFY than the one I
> provided as it allows a key to be an empty string.
>
> keyfilter=lambda key=' '.join([x.capitalize() for x in
> key[2:].split('_')]) if key[1:2]=='_' else key
>
> I have updat
I am sorry that I did not comment as well.
I took a look when you originally posted, and I like it. I didn't
comment because I do not use BEAUTIFY.
I really do like the recursive, +1 for me, but only as another option
to the current beautify not a replacement.
-Thadeus
On Tue, Feb 16, 2010
I will say this, it is alot better, because you can hardly even tell
it is a prototyping table, it could in certain situations pass for
production quality :)
-Thadeus
On Tue, Feb 16, 2010 at 9:06 PM, Thadeus Burgess wrote:
> I am sorry that I did not comment as well.
>
> I took a look when y
On Feb 17, 2010, at 3:49 AM, John Heenan wrote:
> The code I posted does not replace the normal behaviour of BEAUTIFY.
> There is choice. In the four line example code I posted (which is from
> a web2py slice) the keys are only changed if the second character is
> an underscore.
>
> I accept ther
14 matches
Mail list logo