[web2py:37009] Re: Possible Bug (I think) in count()
You are absolutelly right again, I was surprised that the comparison value was changed from 1 to 'T'. I had assumed that boolean was ussually mapped to int fields rather than char(1). By defining the field in web2py as integer, everything works as expected. Thanks again. Benigno. On Dec 10, 6:52 pm, mdipierro mdipie...@cs.depaul.edu wrote: On a second thought. If you are summing it perhaps it is not a 'boolean' or a 'string' but an 'integer' that you wish to use as a boolean with 1,0 instead of True/False. Massimo On Dec 10, 11:44 am, mdipierro mdipie...@cs.depaul.edu wrote: web2py for portability reasons defines: 'boolean': 'CHAR(1)', If you are using a legacy database and you are not using a CHAR(1) for boolean, you need to use string instead of boolean when you define the field in web2py. Massimo On Dec 10, 11:28 am, Benigno bca...@albendas.com wrote: Hmmm, it translates on its own 1 to True like this: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; Which results in 58 rows Whereas if it does SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo=1; Then result is 112 MySQL seems to take anything it doesnt understand as a 0 and returns all the values = 0. (If instead of 'T' I enter any other char value still gets the ceroes as if it was retreiving false values). True or false are like SELECT count(*) FROM direccionesgrupo WHERE activo=TRUE; or SELECT count(*) FROM direccionesgrupo WHERE activo=FALSE; for MySQL. Which are actually just aliases TRUE for 1, FALSE for 0. Probably need to change the SELECT generated to 1 or 0, or not change value from 1 to 'T' on its own. If instead of ==1 I use ==True, same result (though I guess you are aware of that). db(db.direccionesgrupo.activo==True)._select('count(*)') Out[3]: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; On Dec 10, 5:38 pm, mdipierro mdipie...@cs.depaul.edu wrote: print db(db.direccionesgrupo.activo==1)._select('count(*)') do you see anything wrong in the generated sql? On Dec 10, 9:48 am, Benigno bca...@albendas.com wrote: In the table this is taken from, activo is either 1 or 0. In the table which is legacy MySQL it is defined as INT(1) These are the results I am getting: In [46]: db(db.direccionesgrupo.activo == 1).count() Out[46]: 58L In [48]: a =db().select(db.direccionesgrupo.activo.sum()) In [49]: print a --- print(a) SUM(direccionesgrupo.activo) 112 In [51]: b = db(db.direccionesgrupo.activo==1).select('count(*)') In [52]: print b --- print(b) count(*) 58 The correct value is the one done with the aggregate sum(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37010] Re: new on web2pyslices.com: WebGrid
Villas, There is a nice jquery plug-in called datatables, check it at http://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37011] Re: e-Store Appliance in GAE
Good, very good ! -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37012] Re: new on web2pyslices.com: WebGrid
Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37013] Re: Fail login doesn't return an errorm msg
I tried the solution in this thread but unsuccessful: http://groups.google.com/group/web2py/browse_thread/thread/9e2441a938368b3a/451cfaf61e60a731?lnk=gstq=double+redirect#451cfaf61e60a731 Anyway idea ? Yannick P. On Dec 10, 10:09 pm, Yannick ytchatch...@gmail.com wrote: Hello thanks for the note... I did add print request.function and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=request, f='profile') Do you have any idea... I'll keep debugging... On Dec 9, 11:20 pm, mdipierro mdipie...@cs.depaul.edu wrote: Add a print request.function to your model and check if there is a double redirect. The other possibility is that sessions are not working. On Dec 9, 9:12 pm, Yannick ytchatch...@gmail.com wrote: Is anyone already has this issue and where able to solve it... I don't see any double redirect in my code... Thanks for your help... On Dec 9, 11:36 am, Wes James compte...@gmail.com wrote: Sorry, I'm not sure exactly when/where I made this change in the last week. You can use wingide and check what the repsponse.flash is between function calls. -wes On Wed, Dec 9, 2009 at 8:49 AM, Yannick ytchatch...@gmail.com wrote: Hmm interesting, thanks for the note... I don't think I'm doing a double redirection in my code though... can you please let me know how you resolved that issue when you had it Thanks, Yannick P. On Dec 9, 9:30 am, Wes James compte...@gmail.com wrote: On Tue, Dec 8, 2009 at 9:35 PM, Yannick ytchatch...@gmail.com wrote: hello mate, I wonder because I noticed that in auth, when the user fails to login (enter a fake username and password) there is no error message returned... Yannick, I just tried it on one of my sites and I got Invalid Login flash message. I had the same issue on one of my forms not showing field validation errors. It was as mr.freeze indicated, a double redirect that was causing this . -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37014] Re: Populate failed with 'time' field
Yes, TortoiseHG. In the old one, also Tortoise, I just had to right click and select update (or whatever it was since I had to delete it to get the icons working with hg) and web2py was updated; show log also displayed all the available updates up to the latest one posted. On this one neither does until you manually download and view incoming changesets. My idea is not to vent my tiffs with this client but to share my experiences so that others know how to proceed in case they run into them, and maybe I will get lucky and have somebody more experienced with it tell me how to use it properly. On the plus side, it is speedier. P.S. sorry for hijacking the thread. On Dec 11, 12:23 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: that's a gui-client thing - you'll have to get used to whatever gui client you have (tortoise?); at the command line (where the real SCM is), they are all surprisingly similar in the basic operations (as you would expect, since basic source control operations are fundamentally the same - check in, check out; status; update/pull...). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37015] Re: Fail login doesn't return an errorm msg
On Thu, Dec 10, 2009 at 8:09 PM, Yannick ytchatch...@gmail.com wrote: Hello thanks for the note... I did add print request.function and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=request, f='profile') comment this out just to see what happens... or use wingide and see where it goes. Do you have any idea... I'll keep debugging... On Dec 9, 11:20 pm, mdipierro mdipie...@cs.depaul.edu wrote: Add a print request.function to your model and check if there is a double redirect. The other possibility is that sessions are not working. On Dec 9, 9:12 pm, Yannick ytchatch...@gmail.com wrote: Is anyone already has this issue and where able to solve it... I don't see any double redirect in my code... Thanks for your help... On Dec 9, 11:36 am, Wes James compte...@gmail.com wrote: Sorry, I'm not sure exactly when/where I made this change in the last week. You can use wingide and check what the repsponse.flash is between function calls. -wes On Wed, Dec 9, 2009 at 8:49 AM, Yannick ytchatch...@gmail.com wrote: Hmm interesting, thanks for the note... I don't think I'm doing a double redirection in my code though... can you please let me know how you resolved that issue when you had it Thanks, Yannick P. On Dec 9, 9:30 am, Wes James compte...@gmail.com wrote: On Tue, Dec 8, 2009 at 9:35 PM, Yannick ytchatch...@gmail.com wrote: hello mate, I wonder because I noticed that in auth, when the user fails to login (enter a fake username and password) there is no error message returned... Yannick, I just tried it on one of my sites and I got Invalid Login flash message. I had the same issue on one of my forms not showing field validation errors. It was as mr.freeze indicated, a double redirect that was causing this . -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37016] Re: sqlite legacy support
It declares that there is a field 'staid' of type 'id' and this overrides the default 'id' field. Basically 'staid' will be the primary key and will be used in place of 'id'. This is a new feature that has not been tested much but it should work fine. Massimo On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37017] Re: Fail login doesn't return an errorm msg
Yes I did comment this out auth.settings.login_next=URL(r=request, f='profile') but still same old, the double redirect is still there... I really wonder what trigger that double redirection... there is nothing extra I'm doing here, I fulling using Auth API... Hmmm... On Dec 11, 9:33 am, Wes James compte...@gmail.com wrote: On Thu, Dec 10, 2009 at 8:09 PM, Yannick ytchatch...@gmail.com wrote: Hello thanks for the note... I did add print request.function and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=request, f='profile') comment this out just to see what happens... or use wingide and see where it goes. Do you have any idea... I'll keep debugging... On Dec 9, 11:20 pm, mdipierro mdipie...@cs.depaul.edu wrote: Add a print request.function to your model and check if there is a double redirect. The other possibility is that sessions are not working. On Dec 9, 9:12 pm, Yannick ytchatch...@gmail.com wrote: Is anyone already has this issue and where able to solve it... I don't see any double redirect in my code... Thanks for your help... On Dec 9, 11:36 am, Wes James compte...@gmail.com wrote: Sorry, I'm not sure exactly when/where I made this change in the last week. You can use wingide and check what the repsponse.flash is between function calls. -wes On Wed, Dec 9, 2009 at 8:49 AM, Yannick ytchatch...@gmail.com wrote: Hmm interesting, thanks for the note... I don't think I'm doing a double redirection in my code though... can you please let me know how you resolved that issue when you had it Thanks, Yannick P. On Dec 9, 9:30 am, Wes James compte...@gmail.com wrote: On Tue, Dec 8, 2009 at 9:35 PM, Yannick ytchatch...@gmail.com wrote: hello mate, I wonder because I noticed that in auth, when the user fails to login (enter a fake username and password) there is no error message returned... Yannick, I just tried it on one of my sites and I got Invalid Login flash message. I had the same issue on one of my forms not showing field validation errors. It was as mr.freeze indicated, a double redirect that was causing this . -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37018] Re: Fail login doesn't return an errorm msg
For debugging purposes 1) try replace everything in the view with {{=loginform}} 2) try print request.function, request.vars what do you see? Feel free to send me your code and I will take a look. massimo On Dec 11, 8:47 am, Yannick ytchatch...@gmail.com wrote: Yes I did comment this out auth.settings.login_next=URL(r=request, f='profile') but still same old, the double redirect is still there... I really wonder what trigger that double redirection... there is nothing extra I'm doing here, I fulling using Auth API... Hmmm... On Dec 11, 9:33 am, Wes James compte...@gmail.com wrote: On Thu, Dec 10, 2009 at 8:09 PM, Yannick ytchatch...@gmail.com wrote: Hello thanks for the note... I did add print request.function and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=request, f='profile') comment this out just to see what happens... or use wingide and see where it goes. Do you have any idea... I'll keep debugging... On Dec 9, 11:20 pm, mdipierro mdipie...@cs.depaul.edu wrote: Add a print request.function to your model and check if there is a double redirect. The other possibility is that sessions are not working. On Dec 9, 9:12 pm, Yannick ytchatch...@gmail.com wrote: Is anyone already has this issue and where able to solve it... I don't see any double redirect in my code... Thanks for your help... On Dec 9, 11:36 am, Wes James compte...@gmail.com wrote: Sorry, I'm not sure exactly when/where I made this change in the last week. You can use wingide and check what the repsponse.flash is between function calls. -wes On Wed, Dec 9, 2009 at 8:49 AM, Yannick ytchatch...@gmail.com wrote: Hmm interesting, thanks for the note... I don't think I'm doing a double redirection in my code though... can you please let me know how you resolved that issue when you had it Thanks, Yannick P. On Dec 9, 9:30 am, Wes James compte...@gmail.com wrote: On Tue, Dec 8, 2009 at 9:35 PM, Yannick ytchatch...@gmail.com wrote: hello mate, I wonder because I noticed that in auth, when the user fails to login (enter a fake username and password) there is no error message returned... Yannick, I just tried it on one of my sites and I got Invalid Login flash message. I had the same issue on one of my forms not showing field validation errors. It was as mr.freeze indicated, a double redirect that was causing this . -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37019] Re: new on web2pyslices.com: WebGrid
datatables requires a strictly formatted table,i.e. correct thead,tbody,tfoot,etc. declaration. Fran's changes correct formatting errors in the table so you *could* use WebGrid to generate a table that can be used with datatables (SQLTABLE may be a better choice though). WebGrid and datatables have no association. WebGrid is a server based implementation and datatables is client based. Hope that clears thing up. On Dec 11, 5:54 am, villas villa...@gmail.com wrote: Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37020] Custom Form Element For Crud.Create
hi everyone, i was just wondering if it is possible to add a custom form element like an input or a drop down box to a crud.create. i also would like to know how sqlform is different than crud. thank you. Mengu -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37021] Re: sqlite legacy support
On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? This is probably another example where we would have benefitted from a code review / design review. Field() is constructor (manual, p.153), and used to define table fields within the define_table constructor (the way that has been web2py/DAL, in one form or another, forever). This is perhaps the first special form of Field(), and the first one to define default behavior of the ID field (which is why it is natural at first blush to use the Field() constructor for this, but as we see from this thread it is not intuitive, and can confuse by virtue of a new, special form of a heretofore clear constructor). define_table() has a special first parameter, which is the table name, and an additional parameter which defines special table _behavior_, that is migrate=some_value. Probably a better form for this particular change in default behavior would have been something like: id='stiad' Having an attribute of table called id, once you look at the code, shows all the places that the magic field (literal) id exists, and should be replaced by an attribute (with default of id='id'; but I digress... I think, for define_table, a parameter of the form: id='staid' would be both easier to explain (changes some default behavior of the table, just as migrate does), more consistent with the historical implementation, and at the same time would give the added benefit of showing up a common, and problematic coding style w/in gluon of using FNMs (flaming magic numbers - that is, a repetitive constant value where a symboic value would make the code both more readable, and more maintainable). - Yarko ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37022] Re: Custom Form Element For Crud.Create
form = crud.update(...,next='...') is equivalent to form = SQLFORM(...) if form.accepts(request.vars,session): session.flash='' redirect(next) curd.create is the same as crud.update but makes a new record instead of creating an existing one. When you use SQLFORM you explicitly pass all parameters, while in crud.create/update you have some sensible defaults and you change them via crud.settings. You can add elements in both cases with form[0].append(TR('label',INPUT(_name='xxx'),'')) In crud.create/update you must process 'xxx' in the onaccept function. In SQLFORM you have have more flexibility and you can do it after accept, before redirect. On Dec 11, 10:02 am, Mengu whalb...@gmail.com wrote: hi everyone, i was just wondering if it is possible to add a custom form element like an input or a drop down box to a crud.create. i also would like to know how sqlform is different than crud. thank you. Mengu -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37023] Re: sqlite legacy support
I reviewed it! There is nothing special in Field(...,'id'). All tables must have a field of type 'id' with two exceptions: - if you do not specify one, one is created automatically and called 'id' as the type (Field('id','id'), the default) - legacy database can have more complex keys (Denes' keyed tables) and they do not need an 'id' field (so far works only for mssql and ingres I think). Massimo On Dec 11, 10:03 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? This is probably another example where we would have benefitted from a code review / design review. Field() is constructor (manual, p.153), and used to define table fields within the define_table constructor (the way that has been web2py/DAL, in one form or another, forever). This is perhaps the first special form of Field(), and the first one to define default behavior of the ID field (which is why it is natural at first blush to use the Field() constructor for this, but as we see from this thread it is not intuitive, and can confuse by virtue of a new, special form of a heretofore clear constructor). define_table() has a special first parameter, which is the table name, and an additional parameter which defines special table _behavior_, that is migrate=some_value. Probably a better form for this particular change in default behavior would have been something like: id='stiad' Having an attribute of table called id, once you look at the code, shows all the places that the magic field (literal) id exists, and should be replaced by an attribute (with default of id='id'; but I digress... I think, for define_table, a parameter of the form: id='staid' would be both easier to explain (changes some default behavior of the table, just as migrate does), more consistent with the historical implementation, and at the same time would give the added benefit of showing up a common, and problematic coding style w/in gluon of using FNMs (flaming magic numbers - that is, a repetitive constant value where a symboic value would make the code both more readable, and more maintainable). - Yarko ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37024] Re: Custom Form Element For Crud.Create
Hi Mengu, i was just wondering if it is possible to add a custom form element like an input or a drop down box to a crud.create. i also would like to know how sqlform is different than crud. I don't know if this what you're looking for, but I needed a custom drop box in a crud.create and a crud.update form, I added the following line to the function: activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) The entire function reads like: @auth.requires_membership('site_manager') def create_timetable(): response.view='default/form.html' response.flash='Insert class' db.timetable.company.default=auth.user.company activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) form=create_form(db.timetable,message='Class inserted') return dict(form=form) create_form is a custom function in which I add a reset and canel button to the from, I guess that answers the first part of your question: def create_form(table,message): form=crud.create(table,message=message) form[0][-1][1].append(INPUT(_type=reset,_value=Reset)) form[0][-1][1].append(INPUT (_type=button,_value=Cancel,_onclick=javascript:history.go(-1))) return form I hope this will point you in the right direction. Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37025] Re: sqlite legacy support
Yarko, This feature as well as the new Keyed Tables (which do somewhat what you say) were proposed, implemented in trunk, and there was an RFC on this mailing list. They both made in trunk one month ago. I understand you do not like the syntax but you cannot complain about it now that it is done. I believe the current implementation is much cleaner than the one you propose, in fact it was implemented without creating any new API. Unfortunately these features are only one month old therefore they are not in the book, need more testing and need more documentation. The Keyed tables for now only form for some dbs. The functionality will be extended as needed by users while keeping the current syntax. There is no FNM (?!). In fact the 'id' type always existed. The 'id' field has always been of 'id' type since web2py 1.0 in October 2007. Massimo On Dec 11, 10:03 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? This is probably another example where we would have benefitted from a code review / design review. Field() is constructor (manual, p.153), and used to define table fields within the define_table constructor (the way that has been web2py/DAL, in one form or another, forever). This is perhaps the first special form of Field(), and the first one to define default behavior of the ID field (which is why it is natural at first blush to use the Field() constructor for this, but as we see from this thread it is not intuitive, and can confuse by virtue of a new, special form of a heretofore clear constructor). define_table() has a special first parameter, which is the table name, and an additional parameter which defines special table _behavior_, that is migrate=some_value. Probably a better form for this particular change in default behavior would have been something like: id='stiad' Having an attribute of table called id, once you look at the code, shows all the places that the magic field (literal) id exists, and should be replaced by an attribute (with default of id='id'; but I digress... I think, for define_table, a parameter of the form: id='staid' would be both easier to explain (changes some default behavior of the table, just as migrate does), more consistent with the historical implementation, and at the same time would give the added benefit of showing up a common, and problematic coding style w/in gluon of using FNMs (flaming magic numbers - that is, a repetitive constant value where a symboic value would make the code both more readable, and more maintainable). - Yarko ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37026] Re: new on web2pyslices.com: WebGrid
Here is a list of changes: * Allows setting of 'id' for the table * No Additional TBODY when header included * THEAD includes THs not TDs * No odd '%s' in Class * PEP-8 cleanup * row_created event On Dec 11, 9:07 am, mr.freeze nat...@freezable.com wrote: datatables requires a strictly formatted table,i.e. correct thead,tbody,tfoot,etc. declaration. Fran's changes correct formatting errors in the table so you *could* use WebGrid to generate a table that can be used with datatables (SQLTABLE may be a better choice though). WebGrid and datatables have no association. WebGrid is a server based implementation and datatables is client based. Hope that clears thing up. On Dec 11, 5:54 am, villas villa...@gmail.com wrote: Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37027] Re: sqlite legacy support
On Dec 11, 10:13 am, mdipierro mdipie...@cs.depaul.edu wrote: I reviewed it! There is nothing special in Field(...,'id'). All tables must have a field of type 'id' with two exceptions: - if you do not specify one, one is created automatically and called 'id' as the type (Field('id','id'), the default) ... and this is what I meant when I said there is something special about 'id' - it is not like other fields, e.g. special; maybe this is ok - but there is evidence in this thread of confusion (and, yes, I am aware it is new...) - legacy database can have more complex keys (Denes' keyed tables) and they do not need an 'id' field (so far works only for mssql and ingres I think). ... I am not familiar w/ Denes's extension (and was not commenting on it; but thanks for pointing it out, that it is different). Massimo On Dec 11, 10:03 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? This is probably another example where we would have benefitted from a code review / design review. Field() is constructor (manual, p.153), and used to define table fields within the define_table constructor (the way that has been web2py/DAL, in one form or another, forever). This is perhaps the first special form of Field(), and the first one to define default behavior of the ID field (which is why it is natural at first blush to use the Field() constructor for this, but as we see from this thread it is not intuitive, and can confuse by virtue of a new, special form of a heretofore clear constructor). define_table() has a special first parameter, which is the table name, and an additional parameter which defines special table _behavior_, that is migrate=some_value. Probably a better form for this particular change in default behavior would have been something like: id='stiad' Having an attribute of table called id, once you look at the code, shows all the places that the magic field (literal) id exists, and should be replaced by an attribute (with default of id='id'; but I digress... I think, for define_table, a parameter of the form: id='staid' would be both easier to explain (changes some default behavior of the table, just as migrate does), more consistent with the historical implementation, and at the same time would give the added benefit of showing up a common, and problematic coding style w/in gluon of using FNMs (flaming magic numbers - that is, a repetitive constant value where a symboic value would make the code both more readable, and more maintainable). - Yarko ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37028] CRYTICAL: Contributor Agreement
If you are a web2py contributor or wish to be one, please sign this contract: http://www.web2py.com/examples/static/agreement.pdf Only contributors who have signed this contract will be listed as official contributors. I will no longer accept major patches from users who have not signed the agreement. Let me explain why this is. It has be brought to my attention that some of you may have signed an employment contract with a third party that prevents contribution to an Open Source project and your employer owns every line of code you write. I hope this is not the case and I probably it is not legal but I got worried. This situation could create some trouble for web2py and result in undesirable expenses. The contract 1) protects web2py freedom by stating that you created the code you contribute to and no one third party owns the copyright on it; 2) gives you the right to re-use the code you contribute to web2py in an way you see fit. This contract is very standard and modeled after the a similar contributor agreement from SUN. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37029] Re: sqlite legacy support
On Dec 11, 10:21 am, mdipierro mdipie...@cs.depaul.edu wrote: Yarko, This feature as well as the new Keyed Tables (which do somewhat what you say) were proposed, implemented in trunk, and there was an RFC on this mailing list. They both made in trunk one month ago. I understand you do not like the syntax but you cannot complain about it now that it is done. ... I am merely commenting on what I saw in this thread, and raising a suggestion that google code-review could be more useful than group threads (and comments / decisions stay with revision history). I hear that you think group / email threads are good enough - maybe so, but I stand by my suggestion that this thread is evidence that the code-review process in place on google code would be beneficial beyond what was in place. Perhaps you are right - perhaps Field() is appropriate here, even though everything about it's handling is special (all the other field options, as far as I can tell, do not apply). I do see this was / is not clear on this thread, and the discussion / decisions are not part of the repository (a benefit which google code- review will add). I believe the current implementation is much cleaner than the one you propose, in fact it was implemented without creating any new API. Perhaps; no new API either way... but your reply seems as if in response to an offense... none intended; Unfortunately these features are only one month old therefore they are not in the book, need more testing and need more documentation. Denes has documeted the items not documented in this list; the code- review thing on google code would add a level of documetation too. The Keyed tables for now only form for some dbs. The functionality will be extended as needed by users while keeping the current syntax. There is no FNM (?!). FMN - magic numbers; in CS it is something we graded down for strongly in our University (of course, this was years ago); What this refers to is constants used, where a name - an abstract, descriptive form would serve better, and even more strongly where the same constant was repeatedly used. There are _some_ cases where a constant is clearer, and surely in Python so much is processed as strings. But in this case I specifically refer to a string - the SAME string - where it is used in a multiple of ways, and thus is an example of the intent of the term I fondly carry with me all these years from University, FMN - that is, something that could be made clearer. A simple grep for 'id' in gluon/sql.py shows it appears 40 times; of this, it appears in a line where 'type' is somehow part of the line (a use of the constant string which I would say is valid, and clear) all of 7 times. That leaves 33 times where - upon perusing the code - one is left to parse on their own: is this referring to the definition of the field type? Is this a reference to the field type in a DB backend descriptor? Is this looking for the field NAMED id? In short, it is an example of why my professors even thought up the term FMN - much like: result = read.port[3] is not as clear as (say) result = read.port[USB_CHIP_SELECT] These really are basics of communicating, I think - the literature of coding. In fact the 'id' type always existed. The 'id' field has always been of 'id' type since web2py 1.0 in October 2007. I understand. That is not what I am talking about. Your code has 'id' as the field type; 'id' as the field name, and possibly other kinds of references. Massimo On Dec 11, 10:03 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 12:41 am, Brian M bmere...@gmail.com wrote: t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? This is probably another example where we would have benefitted from a code review / design review. Field() is constructor (manual, p.153), and used to define table fields within the define_table constructor (the way that has been web2py/DAL, in one form or another, forever). This is perhaps the first special form of Field(), and the first one to define default behavior of the ID field (which is why it is natural at first blush to use the Field() constructor for this, but as we see from this thread it is not intuitive, and can confuse by virtue of a new, special form of a heretofore clear constructor). define_table() has a special first parameter, which is the table name, and an additional parameter which defines special table _behavior_, that is migrate=some_value. Probably a better form for
[web2py:37030] Re: Cron and Windows service
Please do the following check. in gluon/widget.py there if cron and not options.nocron: print 'Starting cron...' contrib.cron.crontype = 'hard' cron = contrib.cron.hardcron() cron.start() is this code executed when you run with -W? What are the values of cron and options.nocron? On Dec 9, 3:43 pm, Brian M bmere...@gmail.com wrote: Massimo - I'm willing to help do some testing since I'm stuck on Windows. SergeyPo - isn't using unixcronand python web2py.py -C -D 1 (externalcron) the recommended method when using FastCGI or WSGI? (http://web2py.com/examples/default/cron) Why would doing essentially the same thing with the Windows scheduler be any different? I don't think python is going to stay running once thecronrun is done. ~Brian On Dec 9, 10:55 am, mdipierro mdipie...@cs.depaul.edu wrote: I will try work on this later today. On Dec 9, 5:55 am, Nicol van der Merwe aspersie...@gmail.com wrote: I am in the same boat as you, Brian. I just started a project hoping this is possible. I would try and submit a patch for this but I have *no* time at all as I am swamped with work :(. On Wed, Dec 9, 2009 at 3:18 AM, Brian M bmere...@gmail.com wrote: Crondoesn't work when running windows as a service?! :( Well that just screwed up my plans - I'm working on a reporting app that will rely fairly heavily on regularly pulling in external data and figured the built-incronwould handle that. Is it all forms ofcronthat don't work with web2py running as a windows service or just the hardcron? In other words, does softcron still work? ~Brian On Dec 4, 9:52 am, mdipierro mdipie...@cs.depaul.edu wrote: There is a logical problem. the web server andcronare two processes and therefore they should be threated as two different services or there should be a mechanism to start and stop them both. Right now the windows service only handles the web service. Thecroncode needs some cleanup because right now it is spread over multiple modules. I'd rather do the cleanup before addingcronto win service. Massimo On Dec 4, 4:32 am, SergeyPo ser...@zarealye.com wrote: Hello, I am having problem withcron. My crontable: */5 * * * * root *default/getcaptypes Controller method 'default/getcaptypes' works fine when you call it directly. It works fine when called bycronwhen web2py is running as console. But it is not working when I start web2py as windows service. Options file contains: extcron = None nocron = None Where else should I look? Sergey -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37031] Unsubscribe is not working
Hi all, First, thanks for all the learning. I think that web2py is a wonderful web application framework, but now my endeavors are oriented back to Zope + Plone, because of the Cyn.in web app. So I'm not reading actively this mailing list. I have tried unsubscribing following the instructions for google groups but I still get mails and this is a traffic I can not manage for a project where I'm not active. Could someone with admin privileges please unsubscribe me? Thanks, Offray -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37032] Re: Unsubscribe is not working
Did you already go to http://groups.google.com/group/web2py/subscribe and select 'No Email'? On Dec 11, 6:36 am, Offray Vladimir Luna Cárdenas off...@riseup.net wrote: Hi all, First, thanks for all the learning. I think that web2py is a wonderful web application framework, but now my endeavors are oriented back to Zope + Plone, because of the Cyn.in web app. So I'm not reading actively this mailing list. I have tried unsubscribing following the instructions for google groups but I still get mails and this is a traffic I can not manage for a project where I'm not active. Could someone with admin privileges please unsubscribe me? Thanks, Offray -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37033] Re: Unsubscribe is not working
On Dec 11, 2009, at 9:42 AM, mr.freeze wrote: Did you already go to http://groups.google.com/group/web2py/subscribe and select 'No Email'? I took care of it. On Dec 11, 6:36 am, Offray Vladimir Luna Cárdenas off...@riseup.net wrote: Hi all, First, thanks for all the learning. I think that web2py is a wonderful web application framework, but now my endeavors are oriented back to Zope + Plone, because of the Cyn.in web app. So I'm not reading actively this mailing list. I have tried unsubscribing following the instructions for google groups but I still get mails and this is a traffic I can not manage for a project where I'm not active. Could someone with admin privileges please unsubscribe me? Thanks, Offray -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37034] Re: Custom Form Element For Crud.Create
thank you annet and massimo. your posts were helpful. massimo, what you mean by processing xxx on onaccept? like form = crud.create(table, onaccept=aMethodName) and then def aMethodName (form): form.vars.field = some value? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37035] Re: Off-Topic: Web2py awesomeness
Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37036] Re: Unable to install application application name
I will not be doing anything for the holidays except programming. I will add this to my list if there are no other takers? -Thadeus On Fri, Dec 11, 2009 at 1:01 AM, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 6:36 PM, mdipierro wrote: I think it removes the uploaded file execpt if tar because in case of tar it is remoevd by unpack. you may want to check it. Alvaro wrote this function. That's right. I'm not sure about the compressed files, though. I'd do some cleanup, but at the moment I don't have time to do the testing, so I'll pass for now. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37037] Re: new on web2pyslices.com: WebGrid
Nathan, does your grid rely on javascript? If no javascript is required, that is one reason to use it rather than datatables :) -Thadeus On Fri, Dec 11, 2009 at 10:35 AM, mr.freeze nat...@freezable.com wrote: Here is a list of changes: * Allows setting of 'id' for the table * No Additional TBODY when header included * THEAD includes THs not TDs * No odd '%s' in Class * PEP-8 cleanup * row_created event On Dec 11, 9:07 am, mr.freeze nat...@freezable.com wrote: datatables requires a strictly formatted table,i.e. correct thead,tbody,tfoot,etc. declaration. Fran's changes correct formatting errors in the table so you *could* use WebGrid to generate a table that can be used with datatables (SQLTABLE may be a better choice though). WebGrid and datatables have no association. WebGrid is a server based implementation and datatables is client based. Hope that clears thing up. On Dec 11, 5:54 am, villas villa...@gmail.com wrote: Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37038] Re: validator less than
Massimo, Why isn't the problem solved by the validator that I posted? In my model the openinghours table reads like: db.define_table('openinghours', Field ('company',db.company,default='',notnull=True,ondelete='CASCADE', writable=False, readable=False), Field('day',db.day,default='',notnull=True,ondelete='RESTRICT'), Field('from_tijd',type='time',default='',notnull=True), Field('to_tijd',type='time',default='',notnull=True), migrate='openinghours.table') ... db.openinghours.from_time.requires=IS_TIME(error_message='should be UU:MM!') db.openinghours.from_time.widget=timeplain db.openinghours.from_time.requires=is_less_than(request.vars.to_time) db.openinghours.to_time.requires=IS_TIME(error_message='should be UU:MM!') db.openinghours.to_time.widget=timeplain In the less_than_class I changed the following line, because of the format of the opening hours: other=datetime.datetime.strptime(self.value,'%H:%M') When I expose the functions that create or update opening hours, I get an error ticket: Traceback (most recent call last): File /Library/Python/2.5/site-packages/web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /Library/Python/2.5/site-packages/web2py/applications/cms/ controllers/services.py, line 224, in module File /Library/Python/2.5/site-packages/web2py/gluon/globals.py, line 103, in lambda self._caller = lambda f: f() File /Library/Python/2.5/site-packages/web2py/gluon/tools.py, line 1644, in f return action(*a, **b) File /Library/Python/2.5/site-packages/web2py/applications/cms/ controllers/services.py, line 34, in update_openinghour form=update_form (db.openingstijd,record,'crud_openinghour','Openingstijd gewijzigd',True) File /Library/Python/2.5/site-packages/web2py/applications/cms/ models/db.py, line 703, in update_form form=crud.update(table,record,next=(URL (r=request,f=next)),message=message,deletable=deletable) File /Library/Python/2.5/site-packages/web2py/gluon/tools.py, line 2040, in update keepvalues=self.settings.keepvalues): File /Library/Python/2.5/site-packages/web2py/gluon/sqlhtml.py, line 765, in accepts onvalidation, File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 1269, in accepts status = self._traverse(status) File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 453, in _traverse newstatus = c._traverse(status) and newstatus File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 453, in _traverse newstatus = c._traverse(status) and newstatus File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 453, in _traverse newstatus = c._traverse(status) and newstatus File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 453, in _traverse newstatus = c._traverse(status) and newstatus File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 460, in _traverse newstatus = self._validate() File /Library/Python/2.5/site-packages/web2py/gluon/html.py, line 1078, in _validate (value, errors) = validator(value) File /Library/Python/2.5/site-packages/web2py/applications/cms/ models/db.py, line 28, in __call__ other=datetime.datetime.strptime(self.value,'%H:%M') TypeError: strptime() argument 1 must be string, not None I don't understand why argument 1 is None. If you want to compare from_time with to_time then to_time should bot be None unless you tell us how should the validation be performed in this case. When the user enters from_time 10:00 and to_time 22:00 the form should be accepted, 10:00 22:00 is True When the user enters from_time 10.00 and to_time 02:00 the form should NOT be accepted. 10:00 02:00 is False. I hope this explanation of my problem helps you help me solve it. Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37039] Re: new on web2pyslices.com: WebGrid
No javascript needed. I have plans to add ajax hooks for inline editing but will make sure that it degrades gracefully when javascript is disabled. On Dec 11, 12:27 pm, Thadeus Burgess thade...@thadeusb.com wrote: Nathan, does your grid rely on javascript? If no javascript is required, that is one reason to use it rather than datatables :) -Thadeus On Fri, Dec 11, 2009 at 10:35 AM, mr.freeze nat...@freezable.com wrote: Here is a list of changes: * Allows setting of 'id' for the table * No Additional TBODY when header included * THEAD includes THs not TDs * No odd '%s' in Class * PEP-8 cleanup * row_created event On Dec 11, 9:07 am, mr.freeze nat...@freezable.com wrote: datatables requires a strictly formatted table,i.e. correct thead,tbody,tfoot,etc. declaration. Fran's changes correct formatting errors in the table so you *could* use WebGrid to generate a table that can be used with datatables (SQLTABLE may be a better choice though). WebGrid and datatables have no association. WebGrid is a server based implementation and datatables is client based. Hope that clears thing up. On Dec 11, 5:54 am, villas villa...@gmail.com wrote: Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37040] validator breaks update and create other table
In my model I have a combination table that combines companies with activities. Since I don't want a user to enter a combination twice I defined the following validator: db.companyactivity.company.requires=[IS_IN_DB(db,db.company.id,'% (companyname)s'),IS_NOT_IN_DB(db (db.companyactivity.activity==request.vars.activity),db.companyactivity.company,error_message='already in database')] I also have a table timetable which reads like: db.define_table('timetable', Field ('company',db.company,default='',notnull=True,ondelete='CASCADE', writable=False, readable=False), Field('activity',length=48,default='',notnull=True), Field('day',db.dag,default='',notnull=True,ondelete='RESTRICT'), Field('time',type='time',default='',notnull=True), Field('duration',length=3,default='',notnull=True), Field('location',length=24), Field ('level',db.level,default=1,notnull=True,ondelete='RESTRICT'), migrate='timetable.table') In my cms the function to insert a class or update a class reads like: @auth.requires_membership('site_manager') def create_timetable(): response.view='default/form.html' response.flash='Insert class' db.timetable.company.default=auth.user.company activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) form=create_form(db.timetable,message='Class inserted') return dict(form=form) @auth.requires_membership('site_manager') def update_timetable(): response.view='default/form.html' response.flash='Update or delete class' record=db.timetable[request.args[0]] if not record or not record.company==auth.user.bedrijf: redirect(URL(r=request,f='crud_timetable')) activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) form=update_form(db.timetable,record,'crud_timetable','Class deleted or updated',True) return dict(form=form) When I expose these function I get the following error ticket: Traceback (most recent call last): File /Library/Python/2.5/site-packages/web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /Library/Python/2.5/site-packages/web2py/applications/cms/ models/db.py, line 293, in module db.bedrijfactiviteit.bedrijf.requires=[IS_IN_DB(db,db.bedrijf.id,'% (bedrijfsnaam)s'),IS_NOT_IN_DB(db (db.bedrijfactiviteit.activiteit==request.vars.activiteit),db.bedrijfactiviteit.bedrijf,error_message='combinatie bedrijf en activiteit al in database')] File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 2310, in __eq__ return Query(self, '=', value) File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 2688, in __init__ right = sql_represent(right, left.type, left._db._dbname) File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 466, in sql_represent return str(int(obj)) ValueError: invalid literal for int() with base 10: 'BodyCircuit' When I remove the validator from the companyactivity table, both functions work for the timetable table work. I don't see the connection between the validator and the two functions, therefore I don't understand why this error occurs. Does one of you know why this happens? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37041] Re: Off-Topic: Web2py awesomeness
:-) Thadeus - What you like is what you like! No one needs to agree! Thanks for being specific - it's a _great_ holiday gift! :-) - Yarko On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37042] Re: validator breaks update and create other table
In your validator: (db.companyactivity.activity==request.vars.activity) the left hand side a reference field or an int and the right hand side is a string. Hard to follow but I think db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) should be db.timetable.activity.requires=IS_IN_SET([row.id for row in activity], [row.activity for row in activity]) Massimo On Dec 11, 12:48 pm, annet annet.verm...@gmail.com wrote: In my model I have a combination table that combines companies with activities. Since I don't want a user to enter a combination twice I defined the following validator: db.companyactivity.company.requires=[IS_IN_DB(db,db.company.id,'% (companyname)s'),IS_NOT_IN_DB(db (db.companyactivity.activity==request.vars.activity),db.companyactivity.company,error_message='already in database')] I also have a table timetable which reads like: db.define_table('timetable', Field ('company',db.company,default='',notnull=True,ondelete='CASCADE', writable=False, readable=False), Field('activity',length=48,default='',notnull=True), Field('day',db.dag,default='',notnull=True,ondelete='RESTRICT'), Field('time',type='time',default='',notnull=True), Field('duration',length=3,default='',notnull=True), Field('location',length=24), Field ('level',db.level,default=1,notnull=True,ondelete='RESTRICT'), migrate='timetable.table') In my cms the function to insert a class or update a class reads like: @auth.requires_membership('site_manager') def create_timetable(): response.view='default/form.html' response.flash='Insert class' db.timetable.company.default=auth.user.company activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) form=create_form(db.timetable,message='Class inserted') return dict(form=form) @auth.requires_membership('site_manager') def update_timetable(): response.view='default/form.html' response.flash='Update or delete class' record=db.timetable[request.args[0]] if not record or not record.company==auth.user.bedrijf: redirect(URL(r=request,f='crud_timetable')) activity=activity_rowset() db.timetable.activity.requires=IS_IN_SET([row.activity for row in activity]) form=update_form(db.timetable,record,'crud_timetable','Class deleted or updated',True) return dict(form=form) When I expose these function I get the following error ticket: Traceback (most recent call last): File /Library/Python/2.5/site-packages/web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /Library/Python/2.5/site-packages/web2py/applications/cms/ models/db.py, line 293, in module db.bedrijfactiviteit.bedrijf.requires=[IS_IN_DB(db,db.bedrijf.id,'% (bedrijfsnaam)s'),IS_NOT_IN_DB(db (db.bedrijfactiviteit.activiteit==request.vars.activiteit),db.bedrijfactiviteit.bedrijf,error_message='combinatie bedrijf en activiteit al in database')] File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 2310, in __eq__ return Query(self, '=', value) File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 2688, in __init__ right = sql_represent(right, left.type, left._db._dbname) File /Library/Python/2.5/site-packages/web2py/gluon/sql.py, line 466, in sql_represent return str(int(obj)) ValueError: invalid literal for int() with base 10: 'BodyCircuit' When I remove the validator from the companyactivity table, both functions work for the timetable table work. I don't see the connection between the validator and the two functions, therefore I don't understand why this error occurs. Does one of you know why this happens? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37043] Re: Off-Topic: Web2py awesomeness
we could add database hooks. Would you make a wishlist for the api? On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37044] Re: Off-Topic: Web2py awesomeness
One thing I appreciate a lot these days is the DAL instead of ORM. This is because I am working on a system with models derived automatically form some documentation and change rapidly as I progress in the documentation. It is very easy to parse text files, extract relations and build models dynamically with the DAL. T3 on GAE even stores models themselves in the database. With an ORM it would much more cumbersome. Massimo On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37045] Re: Off-Topic: Web2py awesomeness
I have been thinking about hooks, and the best way to implement them. I sent you an email a week or so ago about the subject did you get it? Do we have a wiki page for the wishlist? -Thadeus On Fri, Dec 11, 2009 at 2:04 PM, mdipierro mdipie...@cs.depaul.edu wrote: One thing I appreciate a lot these days is the DAL instead of ORM. This is because I am working on a system with models derived automatically form some documentation and change rapidly as I progress in the documentation. It is very easy to parse text files, extract relations and build models dynamically with the DAL. T3 on GAE even stores models themselves in the database. With an ORM it would much more cumbersome. Massimo On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37046] Re: Off-Topic: Web2py awesomeness
On Dec 11, 2:04 pm, mdipierro mdipie...@cs.depaul.edu wrote: One thing I appreciate a lot these days is the DAL instead of ORM. This is because I am working on a system with models derived automatically form some documentation and change rapidly as I progress in the documentation. It is very easy to parse text files, extract relations and build models dynamically with the DAL. T3 on GAE even stores models themselves in the database. With an ORM it would much more cumbersome. I would generally agree, and find the same: in fact, with default views, and form generation, most of MVC is about describing the important persistent data, and making a basic functionality (controller action) to handle something. In the object-relational world, an object IS (in essence) a combination of behavior (methods) and data (accessors for all practical purposes). What an object would provide is a binding and enforcement of data to responsible actor (method) --- but in sorting out what an object should be, the controller / ORM provides a really nice, rapid prototyping environ. Rather than an ORM, in a more complex system, or to enforce a discipline of encapsulation, a controller could by convention NEVER access a table directly, but always through an object responsible for a table (in fact, table definition could be wrapped in a base object in the model area, and controller objects inherit the base, data- defining object). Where an orm is an easy way for connecting an object-designed system, and avoid rewriting data into sql-specifics, this - in the MVC space - is a very nice concept which starts prototyping FROM the persistent data space to begin with, and does not in any way keep a system from taking good advantage of object encapsulation when system complexity (or design) warrants. - Yarko Massimo On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message
[web2py:37047] Re: Off-Topic: Web2py awesomeness
On Dec 11, 2:38 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 2:04 pm, mdipierro mdipie...@cs.depaul.edu wrote: One thing I appreciate a lot these days is the DAL instead of ORM. This is because I am working on a system with models derived automatically form some documentation and change rapidly as I progress in the documentation. It is very easy to parse text files, extract relations and build models dynamically with the DAL. T3 on GAE even stores models themselves in the database. With an ORM it would much more cumbersome. I would generally agree, and find the same: in fact, with default views, and form generation, most of MVC is about describing the important persistent data, and making a basic functionality (controller action) to handle something. ... for rapid web-app prototyping In the object-relational world, an object IS (in essence) a combination of behavior (methods) and data (accessors for all practical purposes). What an object would provide is a binding and enforcement of data to responsible actor (method) --- but in sorting out what an object should be, the controller / ORM provides a really nice, rapid prototyping environ. ... sorry: this should have said ... controller / DAL Rather than an ORM, in a more complex system, or to enforce a discipline of encapsulation, a controller could by convention NEVER access a table directly, but always through an object responsible for a table (in fact, table definition could be wrapped in a base object in the model area, and controller objects inherit the base, data- defining object). Where an orm is an easy way for connecting an object-designed system, and avoid rewriting data into sql-specifics, this - in the MVC space - is a very nice concept which starts prototyping FROM the persistent data space to begin with, and does not in any way keep a system from taking good advantage of object encapsulation when system complexity (or design) warrants. - Yarko Massimo On Dec 11, 12:23 pm, Thadeus Burgess thade...@thadeusb.com wrote: Summary: web2py: simple, concise forms python as a templating language true model controller view cycle friendly table definitions sql-like query functions automatic-migrations ...so much more django: database hooks The details: Django makes no logical sense... at least to an anal programmer like me :) web2py makes things simple. I can accomplish the same thing, in less lines of code, and in a more logical sense with web2py. Just take SQLFORM for example. It's simple. It's logical. It works, especially SQLFORM.factory. Django introduces a lot of spaghetti code by design. I have yet to see a django form that was actually useful that wasn't spread across a few different files. (forms.py, views.py, etc...) Every time I go to write a django app, it seems I cannot create a single view without having to define my own custom templatetag to do what I want to accomplish. This is where web2py excels in having python as its templating language. The main problem I have against django is the mindset of its design. In my opinion, its logically backwards, its archaic, its spaghetti string. This comes from the design being centred around the newsroom. Django (in my opinion) breaks logical engineering standards. MCV (web2py) vs MVT (django). Not that this effects how django performs, but it hurts my brain. Web2py, doesn't hurt my brain. I also hate hate hate hate the way django defines models and queries. Again it just seems like, it's trying too hard. I love in web2py that you just define your fields, and in one string say what type it is, and have that translated to your database. Also, queries, what is django thinking? Why does the query have to be hidden behind an archaic ill-logical double underscore syntax? I love that web2py's queries are close to SQL, those SQL classes I took in college actually mean something. Django queries, by design, make you think as a non-programmer. Lastly, you can't beat automatic migrations during development. That being said, there are things about django that I like, things that one day I hope start inching their way into web2py. I would like to have database hooks, something that was more behind the scenes that .accepts(onvalidation=...) actually that's about the only thing I can think of django having that I wish web2py had. I know that many would disagree with me, especially those who use django. It's just my opinion, and opinions are like butt holes, we all have them, and they all stink. I do not want to start a flamewar (which is why I kept it to a one liner in the first post), I am just answering Yarkos question. -Thadeus On Thu, Dec 10, 2009 at 11:19 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: can you
[web2py:37048] Database driven Calendar
Hello all, I would like to build an application that displays a calendar showing events for each day/week. These events are stored in a database that is accessed by web2py. (similar to Google calendar) Do you have any recommendations for any existing calendar framework that can work with web2py? I need a displaying framework not a calendaring server like Bedework. Thank you for your inputs. -Sebastian -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37049] Database driven Calendar
I would suggest jquery fullcalendar. It acts similar to google calendar. http://arshaw.com/fullcalendar/ -Thadeus On Fri, Dec 11, 2009 at 2:45 PM, DJ sebastianjaya...@gmail.com wrote: ou have any recommendations for any existing calendar framework that can work with web2py? I need a displaying framework not a calendaring server like Bede -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37052] sqlform view
Hi, I use sqltable to show data, but i want to show al the field data, but it just shows me a part of it, like this: auth_user.idauth_user.first_nameauth_user.last_name 1IvanCastillo Ponc... I'd like to show this, using sqltable: auth_user.idauth_user.first_nameauth_user.last_name 1IvanCastillo Ponce How can i do it? pls. Thanks. Thanks in advance -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37053] Re: new on web2pyslices.com: WebGrid
Just added: multiple grids per page is supported now! Enjoy, Nathan On Dec 11, 12:35 pm, mr.freeze nat...@freezable.com wrote: No javascript needed. I have plans to add ajax hooks for inline editing but will make sure that it degrades gracefully when javascript is disabled. On Dec 11, 12:27 pm, Thadeus Burgess thade...@thadeusb.com wrote: Nathan, does your grid rely on javascript? If no javascript is required, that is one reason to use it rather than datatables :) -Thadeus On Fri, Dec 11, 2009 at 10:35 AM, mr.freeze nat...@freezable.com wrote: Here is a list of changes: * Allows setting of 'id' for the table * No Additional TBODY when header included * THEAD includes THs not TDs * No odd '%s' in Class * PEP-8 cleanup * row_created event On Dec 11, 9:07 am, mr.freeze nat...@freezable.com wrote: datatables requires a strictly formatted table,i.e. correct thead,tbody,tfoot,etc. declaration. Fran's changes correct formatting errors in the table so you *could* use WebGrid to generate a table that can be used with datatables (SQLTABLE may be a better choice though). WebGrid and datatables have no association. WebGrid is a server based implementation and datatables is client based. Hope that clears thing up. On Dec 11, 5:54 am, villas villa...@gmail.com wrote: Hi Benigno, DataTables plug in looks good. I thought the main advantages of Mr Freeze's version was (a) server pagination (b) avoid including another jquery file 60kb. If DataTables plug also does (a), then maybe the only difference is (b) and eye candy. Perhaps Mr Freeze could assist by briefly summing up what the essential differences are between his Webgrid and DataTables. With perhaps some indication as to where one would favour one or the other. This could save a lot of time. I am also still not clear about the 'DataTables Compliant'; do the two grids interact or coexist in some way? Thanks. On Dec 11, 8:43 am, Benigno bca...@albendas.com wrote: Villas, There is a nice jquery plug-in called datatables, check it athttp://www.datatables.net/ which basically means that you can create a grid with server pagination in minutes, and make it look beautifull with datatables all in one go. I guess thats what Mr Freeze is refering to anyway. On Dec 11, 3:33 am, villas villa...@gmail.com wrote: Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37054] Re: Database driven Calendar
Thanks Thadeus and Massimo. The fullcalendar app looks great in the CRM demo. Will check out the source. -Sebastian On Dec 11, 4:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: It is used in here: http://web2py-crm.appspot.com/ The source is posted. Massimo On Dec 11, 2:48 pm, Thadeus Burgess thade...@thadeusb.com wrote: I would suggest jquery fullcalendar. It acts similar to google calendar. http://arshaw.com/fullcalendar/ -Thadeus On Fri, Dec 11, 2009 at 2:45 PM, DJ sebastianjaya...@gmail.com wrote: ou have any recommendations for any existing calendar framework that can work with web2py? I need a displaying framework not a calendaring server like Bede -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37055] Re: sqlform view
{{=SQLTABLE(rows,truncate=1000)}} On Dec 11, 4:10 pm, __Kyo__ iacastil...@gmail.com wrote: Hi, I use sqltable to show data, but i want to show al the field data, but it just shows me a part of it, like this: auth_user.id auth_user.first_name auth_user.last_name 1 Ivan Castillo Ponc... I'd like to show this, using sqltable: auth_user.id auth_user.first_name auth_user.last_name 1 Ivan Castillo Ponce How can i do it? pls. Thanks. Thanks in advance -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37056] Re: Populate failed with 'time' field
I get the following traceback while attempting to use populate on 10,000 records. Works in intervals of 50 :) Traceback (most recent call last): File /home/thadeusb/Applications/tb-web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /home/thadeusb/Applications/tb-web2py/applications/ngram/models/db.py, line 10, in module populate(db.lotsofcontent, 1) File /home/thadeusb/Applications/tb-web2py/gluon/contrib/populate.py, line 73, in populate record[fieldname]=ell.generate(random.randint(10,100),prefix=None) File /home/thadeusb/Applications/tb-web2py/gluon/contrib/populate.py, line 36, in generate db=self.db[key] KeyError: '' -Thadeus On Fri, Dec 11, 2009 at 8:29 AM, DenesL denes1...@yahoo.ca wrote: Yes, TortoiseHG. In the old one, also Tortoise, I just had to right click and select update (or whatever it was since I had to delete it to get the icons working with hg) and web2py was updated; show log also displayed all the available updates up to the latest one posted. On this one neither does until you manually download and view incoming changesets. My idea is not to vent my tiffs with this client but to share my experiences so that others know how to proceed in case they run into them, and maybe I will get lucky and have somebody more experienced with it tell me how to use it properly. On the plus side, it is speedier. P.S. sorry for hijacking the thread. On Dec 11, 12:23 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: that's a gui-client thing - you'll have to get used to whatever gui client you have (tortoise?); at the command line (where the real SCM is), they are all surprisingly similar in the basic operations (as you would expect, since basic source control operations are fundamentally the same - check in, check out; status; update/pull...). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37057] Ngram based search. App
http://static.thadeusb.com/web2py.app.ngram.w2p This uses a ngram class and will perform searches on content. With sample data from the populate() function, the results are not very good, however in a blog setting, with real sentences results are very accurate in my testing. -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37058] Re: Off-Topic: Web2py awesomeness
On 11 dic, 19:31, mdipierro mdipie...@cs.depaul.edu wrote: we could add database hooks. Would you make a wishlist for the api? As my English is poor and not know django, someone could explain what database hooks and what benefits you can give? Jose -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37059] Re: Off-Topic: Web2py awesomeness
It's almost silly how much faster (and better) I can code with web2py vs. others. I just picked back up on a large asp.net project and want to gouge my eyes out!!! On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37060] Re: Off-Topic: Web2py awesomeness
On Dec 11, 5:16 pm, mr.freeze nat...@freezable.com wrote: It's almost silly how much faster (and better) I can code with web2py vs. others. I just picked back up on a large asp.net project and want to gouge my eyes out!!! hehehe yeah, I can remember that too except for maybe some things, e.g. view layout, layout tools - to get from a Photoshop (or drawing) layout to what we want, we could still get better... some tools (e.g. stylizer for css) work well... On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37061] Re: Populate failed with 'time' field
Please try trunk again. On Dec 11, 4:35 pm, Thadeus Burgess thade...@thadeusb.com wrote: I get the following traceback while attempting to use populate on 10,000 records. Works in intervals of 50 :) Traceback (most recent call last): File /home/thadeusb/Applications/tb-web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /home/thadeusb/Applications/tb-web2py/applications/ngram/models/db.py, line 10, in module populate(db.lotsofcontent, 1) File /home/thadeusb/Applications/tb-web2py/gluon/contrib/populate.py, line 73, in populate record[fieldname]=ell.generate(random.randint(10,100),prefix=None) File /home/thadeusb/Applications/tb-web2py/gluon/contrib/populate.py, line 36, in generate db=self.db[key] KeyError: '' -Thadeus On Fri, Dec 11, 2009 at 8:29 AM, DenesL denes1...@yahoo.ca wrote: Yes, TortoiseHG. In the old one, also Tortoise, I just had to right click and select update (or whatever it was since I had to delete it to get the icons working with hg) and web2py was updated; show log also displayed all the available updates up to the latest one posted. On this one neither does until you manually download and view incoming changesets. My idea is not to vent my tiffs with this client but to share my experiences so that others know how to proceed in case they run into them, and maybe I will get lucky and have somebody more experienced with it tell me how to use it properly. On the plus side, it is speedier. P.S. sorry for hijacking the thread. On Dec 11, 12:23 am, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: that's a gui-client thing - you'll have to get used to whatever gui client you have (tortoise?); at the command line (where the real SCM is), they are all surprisingly similar in the basic operations (as you would expect, since basic source control operations are fundamentally the same - check in, check out; status; update/pull...). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37062] Re: Off-Topic: Web2py awesomeness
On Dec 11, 5:16 pm, mr.freeze nat...@freezable.com wrote: It's almost silly how much faster (and better) I can code with web2py vs. others. I just picked back up on a large asp.net project and want to gouge my eyes out!!! .. I'll back-pedal a little more: asp.net on a Microsoft environ (e.g. SQL Server) has some pretty nice tools, e.g. Office-Access has a nice visual DRM diagramming tool (better than the javascript one we have played with for web2py, roughly as good as the one available for mysql)... from which you can upsize the table layout to full SQL- Server, so that is actually pretty nice. On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37063] Re: CRYTICAL: Contributor Agreement
OK, I've signed it. It's hanging on my wall for all to see. Anything else you want done with it? On Dec 11, 6:45 pm, mdipierro mdipie...@cs.depaul.edu wrote: If you are a web2py contributor or wish to be one, please sign this contract: http://www.web2py.com/examples/static/agreement.pdf Only contributors who have signed this contract will be listed as official contributors. I will no longer accept major patches from users who have not signed the agreement. Let me explain why this is. It has be brought to my attention that some of you may have signed an employment contract with a third party that prevents contribution to an Open Source project and your employer owns every line of code you write. I hope this is not the case and I probably it is not legal but I got worried. This situation could create some trouble for web2py and result in undesirable expenses. The contract 1) protects web2py freedom by stating that you created the code you contribute to and no one third party owns the copyright on it; 2) gives you the right to re-use the code you contribute to web2py in an way you see fit. This contract is very standard and modeled after the a similar contributor agreement from SUN. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37064] Re: Off-Topic: Web2py awesomeness
The LINQ to SQL designer is actually very good and works flawlessly on legacy databases (MSSQL only of course). It's the needless abstraction of ASP.net over well defined web standards that breaks my heart. They're making strides with MVC but it's still bloated and counter intuitive. On Dec 11, 5:42 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 11, 5:16 pm, mr.freeze nat...@freezable.com wrote: It's almost silly how much faster (and better) I can code with web2py vs. others. I just picked back up on a large asp.net project and want to gouge my eyes out!!! .. I'll back-pedal a little more: asp.net on a Microsoft environ (e.g. SQL Server) has some pretty nice tools, e.g. Office-Access has a nice visual DRM diagramming tool (better than the javascript one we have played with for web2py, roughly as good as the one available for mysql)... from which you can upsize the table layout to full SQL- Server, so that is actually pretty nice. On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37065] Re: CRYTICAL: Contributor Agreement
lol. You could scan and email it to me or give your geographic coordinates and I will hack into the Hubble telescope. On Dec 11, 5:44 pm, guruyaya guruy...@gmail.com wrote: OK, I've signed it. It's hanging on my wall for all to see. Anything else you want done with it? On Dec 11, 6:45 pm, mdipierro mdipie...@cs.depaul.edu wrote: If you are a web2py contributor or wish to be one, please sign this contract: http://www.web2py.com/examples/static/agreement.pdf Only contributors who have signed this contract will be listed as official contributors. I will no longer accept major patches from users who have not signed the agreement. Let me explain why this is. It has be brought to my attention that some of you may have signed an employment contract with a third party that prevents contribution to an Open Source project and your employer owns every line of code you write. I hope this is not the case and I probably it is not legal but I got worried. This situation could create some trouble for web2py and result in undesirable expenses. The contract 1) protects web2py freedom by stating that you created the code you contribute to and no one third party owns the copyright on it; 2) gives you the right to re-use the code you contribute to web2py in an way you see fit. This contract is very standard and modeled after the a similar contributor agreement from SUN. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37067] Re: CRYTICAL: Contributor Agreement
Need to think about it. On Dec 11, 5:54 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: actually, is there some acceptable digital signature you can accept? (This seems both more secure for the sender, and safer for you, than scanned signatures). On Dec 11, 5:52 pm, mdipierro mdipie...@cs.depaul.edu wrote: lol. You could scan and email it to me or give your geographic coordinates and I will hack into the Hubble telescope. On Dec 11, 5:44 pm, guruyaya guruy...@gmail.com wrote: OK, I've signed it. It's hanging on my wall for all to see. Anything else you want done with it? On Dec 11, 6:45 pm, mdipierro mdipie...@cs.depaul.edu wrote: If you are a web2py contributor or wish to be one, please sign this contract: http://www.web2py.com/examples/static/agreement.pdf Only contributors who have signed this contract will be listed as official contributors. I will no longer accept major patches from users who have not signed the agreement. Let me explain why this is. It has be brought to my attention that some of you may have signed an employment contract with a third party that prevents contribution to an Open Source project and your employer owns every line of code you write. I hope this is not the case and I probably it is not legal but I got worried. This situation could create some trouble for web2py and result in undesirable expenses. The contract 1) protects web2py freedom by stating that you created the code you contribute to and no one third party owns the copyright on it; 2) gives you the right to re-use the code you contribute to web2py in an way you see fit. This contract is very standard and modeled after the a similar contributor agreement from SUN. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37068] Re: Cron and Windows service
Massimo - here are my test results I modified gluon/widget.py to include the following # ## Starts cron daemon if cron and not options.nocron: print 'Starting cron...' print 'cron = '+str(cron) print 'options.nocron = '+str(options.nocron) contrib.cron.crontype = 'hard' cron = contrib.cron.hardcron() cron.start() When I run python web2py.py -W start I get: python web2py.py -W start default applications appear to be installed already web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2009 Version 1.73.1 (2009-12-07 07:55:13) Database drivers available: SQLite3, PostgreSQL, MSSQL/DB2 Starting cron... cron = True options.nocron = False Starting service web2py I have setup a cron task to simply insert the current datetime into a database table once a minute (hey I'm impatient). Results: web2py server - not running as service: Cron works as expected web2py server - running as a service: Cron tasks do NOT work python web2py.py -C -D 1 cron_log.log : Cron works as expected This is on WindowsXP with current trunk (rev 11) from the google hg repo. ~Brian On Dec 11, 11:12 am, mdipierro mdipie...@cs.depaul.edu wrote: Please do the following check. in gluon/widget.py there ifcronand not options.nocron: print 'Startingcron...' contrib.cron.crontype = 'hard' cron= contrib.cron.hardcron() cron.start() is this code executed when you run with -W? What are the values ofcronand options.nocron? On Dec 9, 3:43 pm, Brian M bmere...@gmail.com wrote: Massimo - I'm willing to help do some testing since I'm stuck on Windows. SergeyPo - isn't using unixcronand python web2py.py -C -D 1 (externalcron) the recommended method when using FastCGI or WSGI? (http://web2py.com/examples/default/cron) Why would doing essentially the same thing with theWindowsscheduler be any different? I don't think python is going to stay running once thecronrun is done. ~Brian On Dec 9, 10:55 am, mdipierro mdipie...@cs.depaul.edu wrote: I will try work on this later today. On Dec 9, 5:55 am, Nicol van der Merwe aspersie...@gmail.com wrote: I am in the same boat as you, Brian. I just started a project hoping this is possible. I would try and submit a patch for this but I have *no* time at all as I am swamped with work :(. On Wed, Dec 9, 2009 at 3:18 AM, Brian M bmere...@gmail.com wrote: Crondoesn't work when runningwindowsas a service?! :( Well that just screwed up my plans - I'm working on a reporting app that will rely fairly heavily on regularly pulling in external data and figured the built-incronwould handle that. Is it all forms ofcronthat don't work with web2py running as a windowsservice or just the hardcron? In other words, does softcron still work? ~Brian On Dec 4, 9:52 am, mdipierro mdipie...@cs.depaul.edu wrote: There is a logical problem. the web server andcronare two processes and therefore they should be threated as two different services or there should be a mechanism to start and stop them both. Right now the windowsservice only handles the web service. Thecroncode needs some cleanup because right now it is spread over multiple modules. I'd rather do the cleanup before addingcronto win service. Massimo On Dec 4, 4:32 am, SergeyPo ser...@zarealye.com wrote: Hello, I am having problem withcron. My crontable: */5 * * * * root *default/getcaptypes Controller method 'default/getcaptypes' works fine when you call it directly. It works fine when called bycronwhen web2py is running as console. But it is not working when I start web2py aswindows service. Options file contains: extcron = None nocron = None Where else should I look? Sergey -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html - May you live every day of your life. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37069] can't upload w2p from/to changeset 10
w2p files created with changeset 10 give this error on upload (also running changeset 10): Traceback (most recent call last): File C:\web2py\hg\gluon\main.py, line 436, in wsgibase parse_get_post_vars(request, environ) File C:\web2py\hg\gluon\main.py, line 308, in parse_get_post_vars if pvalue: File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37070] case and queries
I have been doing initial work with sqlite. In a search all items have been appearing in the results. I am moving to postgresql and now queries are case sensitive. Is there a simple way to get a case insensitive query with web2py/postgresql? thx, -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37071] Re: mercurial help
OK, while how to move forward is being worked out, I thought I'd provide a clear answer for anyone using the mercurial repo who can't get create app to work. Problem: You have cloned the mercurial repository and cannot create a new app from site admin. Error message: Unable to create application your app name Cause: Application creation looks for a file called welcome.w2p in the top- level web2py/ directory. This file is not included in the mercurial repository. Current Solution: The Easy Way: 1) From the site admin screen, clean the Welcome app (to get rid of any unnecessary session, cache, etc files that may be there) 2) From the site admin screen, click the pack all link under the Welcome app 3) Your browser will download a file called web2py.app.welcome.w2p save this file to your top-level web2py/ folder as welcome.w2p 4) Create your new application from the site admin screen. The Harder Way 1) From the site admin screen, clean the welcome app (to get rid of any unnecessary session, cache, etc files that may be there) 2) Create a tar.gz file of the *contents* of the applications/welcome folder and call it welcome.w2p Note that you don't want the welcome folder itself to be included in the tar.gz file - you just want the sub-folders (cache/, controllers/, cron/, databases/, ..., views/, __init__.py). 3) Place the welcome.w2p file you just created in the top-level web2py folder 4) Create your new application from the site admin screen. Hope this helps someone. ~Brian On Dec 7, 8:11 pm, Thadeus Burgess thade...@thadeusb.com wrote: the .w2p files are no longer included, but version-ed directories of the examples and welcome apps are. The consensus was that you would create a new app instead of using the welcome app to make modifications. -Thadeus On Mon, Dec 7, 2009 at 7:55 PM, mr.freeze nat...@freezable.com wrote: I've switched from svn tomercurial(SubClipse to MercurialEclipse) and most everything seems to be working. One question though: Where is welcome.w2p now? Creating a new app fails because it is missing. I don't see an hgignore file anywhere so I don't think it is getting excluded. Has it been removed from source control? Thanks for any help and sorry if this was already discussed, google groups search is abysmal. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37072] case and queries
db(db.table.field.lower().like(%+search_term+%)) -Thadeus On Fri, Dec 11, 2009 at 10:35 PM, Wes James compte...@gmail.com wrote: I have been doing initial work with sqlite. In a search all items have been appearing in the results. I am moving to postgresql and now queries are case sensitive. Is there a simple way to get a case insensitive query with web2py/postgresql? thx, -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37073] case and queries
would you also need to do search_term.lower() to make that work? On Fri, Dec 11, 2009 at 9:40 PM, Thadeus Burgess thade...@thadeusb.com wrote: db(db.table.field.lower().like(%+search_term+%)) -Thadeus On Fri, Dec 11, 2009 at 10:35 PM, Wes James compte...@gmail.com wrote: I have been doing initial work with sqlite. In a search all items have been appearing in the results. I am moving to postgresql and now queries are case sensitive. Is there a simple way to get a case insensitive query with web2py/postgresql? thx, -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37074] Re: can't upload w2p from/to changeset 10
Strange, I just tried with hg changeset 11 and it worked. My Steps: 1) Pack all an application from site admin screen. 2) Use Upload existing application to upload the w2p file you just downloaded. 3) New application successfully created. This is with python 2.6 and just the plain web2py built-in server. ~Brian On Dec 11, 9:40 pm, DenesL denes1...@yahoo.ca wrote: w2p files created with changeset 10 give this error on upload (also running changeset 10): Traceback (most recent call last): File C:\web2py\hg\gluon\main.py, line 436, in wsgibase parse_get_post_vars(request, environ) File C:\web2py\hg\gluon\main.py, line 308, in parse_get_post_vars if pvalue: File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.
Re: [web2py:37075] case and queries [ Solved ]
Thadeus, thx for the tip! this is what works: db(db.table.field.lower().like(%+search_term.lower()+%)) -wes On Fri, Dec 11, 2009 at 9:43 PM, Wes James compte...@gmail.com wrote: would you also need to do search_term.lower() to make that work? On Fri, Dec 11, 2009 at 9:40 PM, Thadeus Burgess thade...@thadeusb.com wrote: db(db.table.field.lower().like(%+search_term+%)) -Thadeus On Fri, Dec 11, 2009 at 10:35 PM, Wes James compte...@gmail.com wrote: I have been doing initial work with sqlite. In a search all items have been appearing in the results. I am moving to postgresql and now queries are case sensitive. Is there a simple way to get a case insensitive query with web2py/postgresql? thx, -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37076] new DAL('gae')
I have re-factored a lot of code in gluon/contrib/gql.py in order to make it leaner, more readable and add new syntax. Now you can do mix and match queries like: q1=(db.table.id==1) q2=(db.table.id0) q3=(db.table.field.belongs(('value1','value2','value3'))) in expressions like db(q1)(q2)q3).select() db(q1qq3).select() db(...).update(...) db(...).delete() Before this patch, belongs was not supported by web2py on GAE, q1 and q2 could not be mixed with other conditions. Now you can do for example: d=datetime.date.today() db.define_table('person',Field('name'),Field('birthday','date')) db.person.insert(name='John',birthday=d) rows=db(db.person.id0)(db.person.name.belongs(('John',))).count() rows=db(db.person.id==1)(db.person.name.belongs(('John',)))\ (birthday==d).update(name='Jim') Moreover the db['_lastsql'] now contains a complete representation of the last query on GAE and it can be used for debugging, and both db, db (...) and can serialized as a string. Please check it and report any problem. Also please let me know if you find places in the online documentation that have just become obsolete. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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:37077] attention ! attention !
The new version in trunk will by default override admin, welcome, examples and create welcome.w2p at startup. This will simplify upgrades. You can test the release candidate here: http://web2py.com/examples/static/1.74.0/web2py_src.zip http://web2py.com/examples/static/1.74.0/web2py_osx.zip http://web2py.com/examples/static/1.74.0/web2py_win.zip The new version also creates all missing folder including a new one (site-packages). You can use it to install web2py level modules that should be shared by all apps. It is automatically added to sys.path. I have checked the source and ows version but not the windows version. If you do please report your findings. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@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.