[web2py:34724] Re: problem with 1.71.2

2009-11-05 Thread mdipierro
On Nov 6, 12:28 am, Iceberg wrote: > Do you mean you will implement a new CacheInRam.__call__(..., > deepcopy=True)? Probably no. But I will think about it. > Or do you mean the current implementation is good enough? I think so > Well, I can > live with that, trying to subclass the CacheInRam

[web2py:34723] Re: problem with 1.71.2

2009-11-05 Thread Iceberg
Do you mean you will implement a new CacheInRam.__call__(..., deepcopy=True)? Or do you mean the current implementation is good enough? Well, I can live with that, trying to subclass the CacheInRam for my own shallowcopy-edition. :-) On Nov6, 2:14pm, mdipierro wrote: > I think the default behav

[web2py:34722] Re: You are going to love this

2009-11-05 Thread mdipierro
It needs cleanup. import glob import os import zipfile import sys def find_path(files): files2 = [x for x in files if not x.endswith('/')] paths2 = set([x[:x.rfind('/')+1] for x in files2]) ell = min([len(x) for x in paths2]) path = list(set([x for x in paths2 if len(x)==ell]))[0

[web2py:34721] Re: problem with 1.71.2

2009-11-05 Thread mdipierro
I think the default behavor should be that the object is deepcopied. On Nov 6, 12:08 am, Iceberg wrote: > > On Nov 6, 2:42 am, mdipierro wrote: > > > > I found the problem. > > > > There is, there always was, a bug in cache.ram. It was caching the > > > original object, not a copy, so if the ob

[web2py:34720] Re: Multiple forms double submission

2009-11-05 Thread mdipierro
It could be. I have not read it. ;-) On Nov 5, 11:23 pm, DenesL wrote: > So the manual is wrong and it should be: > 1) give each form a different name > 2) pass session to accepts > > On 5 nov, 18:42, mdipierro wrote: > > > Session is still needed to prevent double submission. But you can have

[web2py:34719] Re: Does your Response Flash get in the way?

2009-11-05 Thread mdipierro
I like the apple notifications (like current flash but smaller, darker, on the top right corner). On Nov 5, 10:32 pm, Jonathan Lundell wrote: > On Nov 5, 2009, at 8:27 PM, mdipierro wrote: > > > > > you can do > > > def error(text): > >   return TABLE(TR(TD(text)),_class='error') > > > response.

[web2py:34718] Re: You are going to love this

2009-11-05 Thread mdipierro
The plugin action should have some reserved actions like _on_install _on_unistall _configure (what else) That can only be called by the administrator and exposed via admin only. The on_install for example could register a service with cron or append translated string to a language file. The plug

[web2py:34717] Re: problem with 1.71.2

2009-11-05 Thread Iceberg
> On Nov 6, 2:42 am, mdipierro wrote: > > > I found the problem. > > > There is, there always was, a bug in cache.ram. It was caching the > > original object, not a copy, so if the object gets modified the one in > > cache changes too. > > > This bug only showed up now. > > > I fixed in trunk and

[web2py:34715] Re: SQLFORM Date field with no calendar

2009-11-05 Thread Adolfo Vizcarra
Thank you very much for your help Mr. Freeze Adolfo Vizcarra Kusien On Fri, Nov 6, 2009 at 12:43 AM, DenesL wrote: > > Good one mr freeze (a.k.a. mr widget) ;-) > > > On 5 nov, 15:25, mdipierro wrote: > > wow. mr freeze! > > > > On Nov 5, 2:03 pm, "mr.freeze" wrote: > > > > > I couldn't res

[web2py:34716] Re: You are going to love this

2009-11-05 Thread Richard
all the ones I looked at were nicer than the default layout - fantastic! On Nov 6, 4:09 pm, mdipierro wrote: > I downloaded multiple layouts from the web with a free Artistic > License and used a script in BeautifulSoup to replace the header, menu > and content with web2py tags. Then I rearrang

[web2py:34714] Re: SQLFORM Date field with no calendar

2009-11-05 Thread DenesL
Good one mr freeze (a.k.a. mr widget) ;-) On 5 nov, 15:25, mdipierro wrote: > wow. mr freeze! > > On Nov 5, 2:03 pm, "mr.freeze" wrote: > > > I couldn't resist: > > >http://www.web2pyslices.com/main/slices/take_slice/25 > > > On Nov 5, 7:54 am, DenesL wrote: > > > > Hi Adolfo, > > > > you ca

[web2py:34713] Re: You are going to love this

2009-11-05 Thread mr.freeze
I'm starting to be sold on the new plugin system. This is very cool. On Nov 5, 11:09 pm, mdipierro wrote: > I downloaded multiple layouts from the web with a free Artistic > License and used a script in BeautifulSoup to replace the header, menu > and content with web2py tags. Then I rearranged

[web2py:34712] Re: You are going to love this

2009-11-05 Thread DenesL
Wow! A slice with the procedure and code perhaps? It would encourage more layouts. Now we are going to need a layout repository too... On 6 nov, 00:09, mdipierro wrote: > I downloaded multiple layouts from the web with a free Artistic > License and used a script in BeautifulSoup to replace the

[web2py:34711] Re: Multiple forms double submission

2009-11-05 Thread DenesL
So the manual is wrong and it should be: 1) give each form a different name 2) pass session to accepts On 5 nov, 18:42, mdipierro wrote: > Session is still needed to prevent double submission. But you can have > multiple forms on the same page as long as they have different names. > > On Nov 5,

[web2py:34710] Re: js minification

2009-11-05 Thread Beerc
An interesting comparison of JavaScript compressors: http://compressorrater.thruhere.net/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.

[web2py:34709] Re: You are going to love this

2009-11-05 Thread mdipierro
It would be nice is somebody where to go over the list and decide which ones are worth keeping and which ones not. I have not looked at all of them. On Nov 5, 11:09 pm, mdipierro wrote: > I downloaded multiple layouts from the web with a free Artistic > License and used a script in BeautifulSou

[web2py:34708] Re: You are going to love this

2009-11-05 Thread mdipierro
I downloaded multiple layouts from the web with a free Artistic License and used a script in BeautifulSoup to replace the header, menu and content with web2py tags. Then I rearranged the files in the proper web2py locations and stuck everything under one app. It took about 2hrs. One can do better

[web2py:34707] Re: You are going to love this

2009-11-05 Thread Graham Dumpleton
For the curious, would you like to explain the procedure you, or whoever, went about to generate this. Ie., where were original layouts/stylesheets obtained from, what script or whatever was used to convert/package them into form understood by web2py. Sorry if the answer is obvious but I am igno

[web2py:34706] Re: You are going to love this

2009-11-05 Thread Sebastian Brandt
very awesome, thanks! On 6 Nov., 05:56, mdipierro wrote: > http://web2py.com/layouts/plugin_layouts/index?apply=EfflorescenceOrange > > - Try it online first. > - Then download the plugin (it is 30MB and it includes 408 layouts > already customized for web2py, sort of, + images and css). > - App

[web2py:34705] You are going to love this

2009-11-05 Thread mdipierro
http://web2py.com/layouts/plugin_layouts/index?apply=EfflorescenceOrange - Try it online first. - Then download the plugin (it is 30MB and it includes 408 layouts already customized for web2py, sort of, + images and css). - Apply the plugin on top of an existing app using admin (requires 1.71.2 o

[web2py:34704] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 8:27 PM, mdipierro wrote: > > you can do > > def error(text): > return TABLE(TR(TD(text)),_class='error') > > response.flash=error("what the ...!") Right, that's the kind of thing I was thinking of, albeit with a more elaborate table. Then you can use a CSS selector like:

[web2py:34703] Re: Does your Response Flash get in the way?

2009-11-05 Thread mdipierro
you can do def error(text): return TABLE(TR(TD(text)),_class='error') response.flash=error("what the ...!") On Nov 5, 9:28 pm, Jonathan Lundell wrote: > On Nov 5, 2009, at 1:39 PM, mdipierro wrote: > > > > > well, you can do > > > response.flash=DIV("message",_class="error") > > > and handl

[web2py:34702] Re: Does your Response Flash get in the way?

2009-11-05 Thread mdipierro
no On Nov 5, 9:28 pm, Jonathan Lundell wrote: > On Nov 5, 2009, at 1:39 PM, mdipierro wrote: > > > > > well, you can do > > > response.flash=DIV("message",_class="error") > > > and handle both class "flash" and class "error" via css. > > That works fine if your flash html is a simple div (as it

[web2py:34701] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 1:39 PM, mdipierro wrote: > > well, you can do > > response.flash=DIV("message",_class="error") > > and handle both class "flash" and class "error" via css. That works fine if your flash html is a simple div (as it is in the standard layout), but it doesn't work so well if y

[web2py:34700] Re: Does your Response Flash get in the way?

2009-11-05 Thread mdipierro
If you can send me some possible css to make it better, I will consider changing it. The only requirement is that it should be semi transparent and color neutral. Massimo On Nov 5, 7:01 pm, villas wrote: > Yes IMO the current flash is too obtrusive.  I eventually got to like > the slightly quir

[web2py:34699] new on web2pyslices.com: recent comments

2009-11-05 Thread mr.freeze
You can now quickly view recent comments on the left of the home page. http://www.web2pyslices.com/main/default/index If Batman did web development, he would keep a copy of web2py in his utility belt. --~--~-~--~~~---~--~~ You received this message because you are

[web2py:34698] Re: Does your Response Flash get in the way?

2009-11-05 Thread villas
Yes IMO the current flash is too obtrusive. I eventually got to like the slightly quirky left pop-up menu, but the over-size flash still grates every time. Just making it narrower would help. Yep, I know we can alter it ourselves :-) Thanks, David --~--~-~--~~~---~

[web2py:34697] Re: web2py ajax and INPUT

2009-11-05 Thread mdipierro
In the view you have to do something like ... onclick="ajax('{{=URL(r=request,f='callback')}}', [], 'itemize')" and in the controller def callback(): return self.itemize0(db.qpac,nitems=12) You cannot mix Python code and JS. On Nov 5, 4:51 pm, Wes James wrote: > Where can I find a code s

[web2py:34696] Re: Multiple forms double submission

2009-11-05 Thread mdipierro
Session is still needed to prevent double submission. But you can have multiple forms on the same page as long as they have different names. On Nov 5, 4:56 pm, Richard wrote: > That's good to hear. If session is not needed to prevent double > submission then what does it do for a single form? >

[web2py:34695] Re: Multiple forms double submission

2009-11-05 Thread Richard
That's good to hear. If session is not needed to prevent double submission then what does it do for a single form? Richard On Nov 6, 1:49 am, mdipierro wrote: > That is no longer an issue. > > On Nov 5, 6:07 am, Markus Gritsch wrote: > > > Some time ago I had the impression, that it is just wr

[web2py:34694] Re: web2py ajax and INPUT

2009-11-05 Thread Wes James
i.e., I click on a submit button and the results are put in to a div instead of calling the page (like normal next page showing on submit). -wes On Thu, Nov 5, 2009 at 3:51 PM, Wes James wrote: > Where can I find a code snippet that shows how to return the results > of a function via ajax in w2

[web2py:34693] Re: web2py ajax and INPUT

2009-11-05 Thread Wes James
Where can I find a code snippet that shows how to return the results of a function via ajax in w2p? thx, -wes On Thu, Nov 5, 2009 at 3:46 PM, mdipierro wrote: > > OK then > > ajax('{{=self.itemize0(db.qpac,nitems=12)}}', [], 'itemize')" > > is wrong because the first argument of ajax should be

[web2py:34692] Re: web2py ajax and INPUT

2009-11-05 Thread mdipierro
OK then ajax('{{=self.itemize0(db.qpac,nitems=12)}}', [], 'itemize')" is wrong because the first argument of ajax should be the URL that returns self.itemize0(...), it cannot be the HTML generated by the function. On Nov 5, 4:27 pm, Wes James wrote: > No, it's t2.itemize with some of my chan

[web2py:34691] Re: web2py ajax and INPUT

2009-11-05 Thread Wes James
No, it's t2.itemize with some of my changes. I'm trying to get the results back from t2.itemize and put it in a div with ajax. -wes On Thu, Nov 5, 2009 at 3:25 PM, mdipierro wrote: > > The first argument of ajax should be a URL. > I do not know what self.itemize0 is. Does it generate a URL? >

[web2py:34690] Re: web2py ajax and INPUT

2009-11-05 Thread mdipierro
The first argument of ajax should be a URL. I do not know what self.itemize0 is. Does it generate a URL? On Nov 5, 4:03 pm, Wes James wrote: > I have this: > > INPUT(_type='button', _value='search',_onclick="ajax('', [], 'itemize')") > > reload page - works fine: > > Then change to this: > > INP

[web2py:34689] web2py ajax and INPUT

2009-11-05 Thread Wes James
I have this: INPUT(_type='button', _value='search',_onclick="ajax('', [], 'itemize')") reload page - works fine: Then change to this: INPUT(_type='button', _value='search',_onclick="ajax('{{=self.itemize0(db.qpac, nitems=12)}}', [], 'itemize')") I then get: SyntaxError: unexpected character

[web2py:34688] Re: Does your Response Flash get in the way?

2009-11-05 Thread mdipierro
well, you can do response.flash=DIV("message",_class="error") and handle both class "flash" and class "error" via css. On Nov 5, 3:13 pm, Jonathan Lundell wrote: > On Nov 5, 2009, at 12:41 PM, Russell wrote: > > > It does seem that a nice solution would be to position or shrink the > > flash m

[web2py:34687] Re: Join web2py wave

2009-11-05 Thread Oleg
+1 :) On Nov 4, 4:58 pm, hcvst wrote: > Hi Snoogie, > > I had an invite left. Just added you. Might take a couple of days for > Google to > send out the invitation. > > HC > > On Nov 4, 4:20 pm, Sebastian Brandt wrote: > > > Hi, > > I would like to join but I didn't receive an invitation fpr wa

[web2py:34686] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 12:41 PM, Russell wrote: > It does seem that a nice solution would be to position or shrink the > flash message on the default layout so that it is unlikely to cover > text. But it maybe we are trying to do too much with the flash > message? There are some messages that only

[web2py:34685] Re: Does your Response Flash get in the way?

2009-11-05 Thread Russell
It does seem that a nice solution would be to position or shrink the flash message on the default layout so that it is unlikely to cover text. But it maybe we are trying to do too much with the flash message? There are some messages that only deserve a quick 'flash' - like 'logged in'. But ther

[web2py:34684] Re: Does your Response Flash get in the way?

2009-11-05 Thread mr.freeze
I have increased the stay time to 8 seconds. On Nov 5, 1:16 pm, Jonathan Lundell wrote: > On Nov 5, 2009, at 8:52 AM, Thadeus Burgess wrote: > > > Instead of putting a timer on response.flash, I moved its location   > > to another location on the site that does conflict with any text. > > I like

[web2py:34683] Re: SQLFORM Date field with no calendar

2009-11-05 Thread mdipierro
wow. mr freeze! On Nov 5, 2:03 pm, "mr.freeze" wrote: > I couldn't resist: > > http://www.web2pyslices.com/main/slices/take_slice/25 > > On Nov 5, 7:54 am, DenesL wrote: > > > Hi Adolfo, > > > you can use SQLFORM but you have to create your own widget. > > Have a look at "7.5 Widgets" in the bo

[web2py:34682] Re: SQLFORM Date field with no calendar

2009-11-05 Thread mr.freeze
I couldn't resist: http://www.web2pyslices.com/main/slices/take_slice/25 On Nov 5, 7:54 am, DenesL wrote: > Hi Adolfo, > > you can use SQLFORM but you have to create your own widget. > Have a look at "7.5 Widgets" in the book. > > Denes. > > On Nov 4, 12:38 pm, Adolfo wrote: > > > Hello > > >

[web2py:34681] Re: js minification

2009-11-05 Thread Thadeus Burgess
Agreed, jsmin during compile :) This is a perfect example of a web2py plug-in! *it just needs to be written as a plugin* -Thadeus On Thu, Nov 5, 2009 at 12:44 PM, vince wrote: > > i do think it's a good idea if web2py will also do jsmin during > compile. > > vince > > On Nov 5, 10:59 pm, vi

[web2py:34680] Re: Use represent in export_to_csv

2009-11-05 Thread Thadeus Burgess
I am attempting to patch export_to_csv to allow for this, so it could integrate into appadmin. (have a dropdown div to select/specify options for the download as csv) However, I can't seem to find a way to get the "represent" field for the Reference column? I am trying to access where you would

[web2py:34679] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 8:52 AM, Thadeus Burgess wrote: > Instead of putting a timer on response.flash, I moved its location > to another location on the site that does conflict with any text. I like Gmail's approach to flash messages. They're not obtrusive, but they're still prominent enough to b

[web2py:34678] Re: Join web2py wave

2009-11-05 Thread vince
yes pls On Nov 5, 8:22 pm, Markus Gritsch wrote: > Hi, > > it would be nice if you (or someone else) could send me an invitation, > too. > > Thanks, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-use

[web2py:34677] Re: problem with 1.71.2

2009-11-05 Thread vince
thanks for your quick fix! vince On Nov 6, 2:42 am, mdipierro wrote: > I found the problem. > > There is, there always was, a bug in cache.ram. It was caching the > original object, not a copy, so if the object gets modified the one in > cache changes too. > > This bug only showed up now. > > I

[web2py:34676] Re: js minification

2009-11-05 Thread vince
i do think it's a good idea if web2py will also do jsmin during compile. vince On Nov 5, 10:59 pm, vihang wrote: > If not part of web2py, then It would be a superb plugin. Maybe it > could be looked at as a candidate for 'must have' plugins. I was > looking for one myself, had to make do with s

[web2py:34675] Re: problem with 1.71.2

2009-11-05 Thread mdipierro
I found the problem. There is, there always was, a bug in cache.ram. It was caching the original object, not a copy, so if the object gets modified the one in cache changes too. This bug only showed up now. I fixed in trunk and I will post a web2py 1.71.3 asap. For now you can still use the la

[web2py:34674] Re: problem with 1.71.2

2009-11-05 Thread vince
oh yes it's working without cache. vince On Nov 6, 2:19 am, mdipierro wrote: > There is good code here. Can you help me debug this? > can you try remove cache=(...) in validators? > Feel free to email me personally and we'll post the fix when done. > > Massimo > > On Nov 5, 11:25 am, vince wro