[web2py] Re: How do I do transaction in web2py?

2014-05-12 Thread Dragan Matic
All database operations in your controllers which are executed through DAL are executed in a transaction. So every time you do a database operation in your controller it starts a new transaction which is automatically commited if there were no errors. If it encounters any error then the transac

Re: [web2py] web2py conference - online talks

2014-05-12 Thread António Ramos
Amber was only focused in showing how easy it is to create a better experience for the user using Angular than simple javascript. Also a lot less code for us, developers. It was just a simple demo. Of course that if the app was real and to be used by many, she could/should worry about keeping data

[web2py] Scheduler: next_run_time is initially set to time-date of scheduling

2014-05-12 Thread Tom Clerckx
Hi, When adding a new task via queue_task, the next_run_time is initially set to the time the task is added to the queue. Is there a specific reason for this and is there a way to set the first_run_time correctly immediately when adding a new task to the queue? I would expect that the first_ru

[web2py] Re: Scheduler: next_run_time is initially set to time-date of scheduling

2014-05-12 Thread Niphlod
Given that it's a field that is used just for internal usage, the default is "now", and it's used later on for: - repeating tasks - pop out from the queue the tasks in the correct order - mark a task as expired Given the second point, the current default fits the bill, and BTW, users should neve

[web2py] best way to load more db tables via ajax

2014-05-12 Thread Trevor Overman
What would be the most effective way to load, for example, 25 more database tables via an ajax function on clicking, for example again, a more button? What I am trying to do is load the first 25 tables and have this list concatenated for the next 25 in the sorted list. The problem I'm running ac

[web2py] Re: SQLFORM URL duplicate validation

2014-05-12 Thread Anthony
For those interested, solutions here: http://stackoverflow.com/questions/23601275/web2py-sqlform-url-duplicate-validation On Monday, May 12, 2014 12:53:55 AM UTC-4, Sihui Huang wrote: > > I want to forbid users being able to submit duplicate urls into the > database. > > Right now my approach i

Re: [web2py] web2py conference - online talks

2014-05-12 Thread weheh
@Ramos: of course, I understand that Amber's script was necessarily limited, but it did highlight an important gotcha with this kind of scripting when used with web2py. And if all I wanted to do was hide a table entry on click, I wouldn't want to pay the penalty of loading AngularJS to do that.

Re: [web2py] web2py conference - online talks

2014-05-12 Thread António Ramos
I was not talking about hiding on click. I was thinking about filtering with a live search box above the table. Angular Filters and directives are awesome and once you know them you cant stop thinking about them. I´m here to learn so feel free to pun me... :P 2014-05-12 16:25 GMT+01:00 weheh :

Re: [web2py] web2py conference - online talks

2014-05-12 Thread weheh
Filtering and sorting can definitely save on http calls. Is there anything else you can think of where it's applicable without creating a synch issue in highly collaborative apps? On Monday, May 12, 2014 11:37:07 PM UTC+8, Ramos wrote: > > I was not talking about hiding on click. I was thinking

[web2py] Re: What is a clear procedure to style web2py css files using Bootstrap theme generators/choosers?

2014-05-12 Thread JoeCodeswell
Dear LightDot, Thanks SO MUCH for the CLEAR explanations. I'll mark this ANSWER as the BEST. However, the explanation, I think, also includes your other post and Ari's post as well. Thanks again to you BOTH and to this GREAT Community. Love and peace, Joe On Friday, May 9, 2014 4:58:22 PM UT

Re: [web2py] web2py conference - online talks

2014-05-12 Thread António Ramos
I´m just in favor of angular to improve and modernize user experience. In this matter router-ui seems very interesting also. Also ng animate for animations. I dont understand how you relate directly data out of sync with angular and not with web2py. If new data on server, just publish it to the cl

[web2py] Re: color cells based on value in SQLFORM

2014-05-12 Thread LoveWeb2py
Thank you for your reply, Michael & Anthony. Michael: I really like this idea. What would my model look like? I setup db.define_table('status', Field('id','integer'), Field('normal','string'), Field('warning','string'), migrate=False) Would I have to populate the fields or ca

Re: [web2py] web2py conference - online talks

2014-05-12 Thread Michele Comitini
How is angular.js compared to ractive.js inside web2py's ecosystem? What is your opinion? 2014-05-12 18:25 GMT+02:00 António Ramos : > > I´m just in favor of angular to improve and modernize user experience. > In this matter router-ui seems very interesting also. > Also ng animate for animations.

[web2py] ipython notebook and web2py

2014-05-12 Thread Johann Spies
Thanks to Anthony for his talk about the hard way to learn Web2py. Anthony I have been thinking of writing to you to ask about how you got to know the inner workings of Web2py and you have answered about everything in your talk at the conference - of which I saw the video today. I did not know ab

[web2py] disable checkbox on selectable grid.

2014-05-12 Thread TSmith
Using SQLFORM.grid, I can set editable equal to a lambda function and cause edit buttons to only appear for certain rows for example: editable= lambda row : row.locked == 0, If I use a selectable function to add one check box per row, is there a similar function so I could only have

[web2py] Re: Appadmin error - 'Column "auth membership"."id" not found (SQL TABLE)'

2014-05-12 Thread Dave S
On Sunday, May 11, 2014 8:05:15 AM UTC-7, Stefan van den Eertwegh wrote: > > Hi all, > > I have a web2py project and a sqlite database and every table shows this > error: 'Column "auth membership"."id" not found (SQL TABLE)' > Ofcourse every table its own error. > > Does anyone know the solutio

[web2py] Re: list:reference

2014-05-12 Thread Dave S
On Sunday, May 11, 2014 11:06:01 PM UTC-7, Jesse Ferguson wrote: > > I FIgured it out, I was missing the field name when trying to add values i > was doing row.update(data) instead of row.update(posts=data) > Glad you got it working. Now I can search for this post when I get puzzled. /dps

[web2py] Re: best way to load more db tables via ajax

2014-05-12 Thread Dave S
On Monday, May 12, 2014 5:49:23 AM UTC-7, Trevor Overman wrote: > > What would be the most effective way to load, for example, 25 more > database tables via an ajax function on clicking, for example again, a more > button? > What I am trying to do is load the first 25 tables and have this list

[web2py] Re: web2py conference - online talks

2014-05-12 Thread Anthony
I promised the code and slides from my talk -- available here: https://groups.google.com/d/msg/web2py/1_CsiqCzrS4/E0mXwAiwWRYJ. Anthony On Monday, May 5, 2014 11:55:28 AM UTC-4, Massimo Di Pierro wrote: > > Please find below the links to the video of the first web2py conference. > Videos are no

[web2py] Re: color cells based on value in SQLFORM

2014-05-12 Thread Michael Beller
I wouldn't recommend using field names, that would not be very flexible. Here's an option: db.define.table('status', Field('name'), Field('highlight_color')) db.define.table('inventory', Field('item'), Field('status', 'reference status')) Then just populate the status table wit

[web2py] Re: list:reference

2014-05-12 Thread Michael Beller
I haven't used 'list:reference' before, what are the advantages or use cases for your approach rather than add a reference field such as Field('daily', 'reference daily') on the post table? On Monday, May 12, 2014 2:06:01 AM UTC-4, Jesse Ferguson wrote: > > I FIgured it out, I was missing the fi

[web2py] Re: best way to load more db tables via ajax

2014-05-12 Thread Michael Beller
The recipe on pagination in the book may provide some ideas: http://web2py.com/books/default/chapter/29/14/other-recipes?search=pagination#Pagination You could then put your list that you're trying to concatenate in an ajax load. On Monday, May 12, 2014 8:49:23 AM UTC-4, Trevor Overman wrote: >

[web2py] Re: color cells based on value in SQLFORM

2014-05-12 Thread Anthony
Keep in mind, this method will execute a separate database select for every row in the table in order to retrieve the status highlight_color. Also, the CSS rule will not color the background of the entire cell, just the status text (plus padding). Anthony On Monday, May 12, 2014 7:33:06 PM UTC

[web2py] Re: list:reference

2014-05-12 Thread Jesse Ferguson
ok so it actually doesnt work which is really strange. it works on console however when i do it in a scheduled task it jacks up the database somehow, i think I may be inserting the references incorrectly... I will investigate this tonight and try to give everyone an answer -- Resources: -

[web2py] Re: list:reference

2014-05-12 Thread Jesse Ferguson
https://groups.google.com/forum/#!searchin/web2py/list$3Areference/web2py/pXBj0EhX3iA/vamglS5txQsJ seems this may be a bug in web2py... Does anyone know if this bugfix is still only in trunk or if it has been put into stable? -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

Re: [web2py] Re: ipython notebook and web2py

2014-05-12 Thread Johann Spies
Thank you very much Anthony! Again, I received much more than I expected. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we