[web2py] Re: crud not updating

2013-08-11 Thread Tushar Tuteja
I face the same problem, I am using a latest version of web2py and doing crud.settings.detect_record_change = False doesn't make changes On Tuesday, August 30, 2011 10:37:54 PM UTC+5:30, simon wrote: Works with crud.settings.detect_record_change = False Without this it fails any time you

[web2py] Command line login

2013-08-11 Thread Martin Weissenboeck
Hi, I want to build a command line login, eg. https://my.domain.com/app/contr/mylogin?user=abcpwd=secret (Yes, this could be a security risk). At first I have tried to learn more about auth.user_login. The function def ulogin(): auth.login_user(1) returns the following ticket: Ticket ID

[web2py] Re: Multiple authentication forms on one page

2013-08-11 Thread Koen Vanhees
Anyone around who has a clue? Thanks in advance... -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

Re: [web2py] Re: Multiple authentication forms on one page

2013-08-11 Thread Marin Pranjić
You forgot = {{=auth}} {{=auth2}} Marin (mobile) On Aug 11, 2013 11:43 AM, Koen Vanhees vanheesk...@gmail.com wrote: Anyone around who has a clue? Thanks in advance... -- --- You received this message because you are subscribed to the Google Groups web2py-users... -- --- You received

Re: [web2py] Re: Multiple authentication forms on one page

2013-08-11 Thread Marin Pranjić
Sorry, {{=form}} {{=form2}} Marin (mobile) On Aug 11, 2013 11:49 AM, Marin Pranjić marin.pran...@gmail.com wrote: You forgot = {{=auth}} {{=auth2}} Marin (mobile) On Aug 11, 2013 11:43 AM, Koen Vanhees vanheesk...@gmail.com wrote: Anyone around who h... -- --- You received this

[web2py] Where do Validators put their return values?

2013-08-11 Thread archeaneon
I noticed that certain validators alter the values they validate before returning them; I was wondering where this goes? It does not seem to go into post_vars as I had thought it would. An example would be IS_UPPER. Thank you in advance! -- --- You received this message because you are

[web2py] Re: Creating Auth Groups

2013-08-11 Thread Rob Paire
Solved! Thank you for pointing me in the right direction - The problem was that I had inadvertently created a duplicate connection object in my model file. When I commented out the line db = DAL('sqlite://storage.db', pool_size=0) from my own model file, suddenly I could see the auth tables in

[web2py] Where do Validators put their return values?

2013-08-11 Thread Anthony
The transformed value goes into form.vars. Anthony -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: how can a form have a dynamic number of form fields based on dropdown list selection?

2013-08-11 Thread Michael Beller
Thanks Derek, I've tried a few approaches and can't get a good scenario to work. If I add an onchange event using: form=SQLFORM(db.msg, fields=['msg_typ']) mt = form.element(_name='msg_typ') mt['_onchange'] = XML(ajax('get_msg_vars', ['msg_typ'], 'send_msg_form');) I then added the

[web2py] LOAD() not working

2013-08-11 Thread lesssugar
I'm using LOAD() for displaying a feedback form available on every page. I placed the form in layout.html: {{=LOAD('default','suggestions.load',ajax=True)}} The form loads correctly on most of the pages. However there some where the LOAD component does not work (no suggestions.load request is

[web2py] db.py size

2013-08-11 Thread Alex Glaros
Is the size of a model or controller file a reason for breaking it into smaller files? my default/db.py file has over 100 tables and sometimes editing it is slow. Is editing speed by itself a reason for splitting up the file? thanks, Alex -- --- You received this message because you are

[web2py] LOAD() not working

2013-08-11 Thread Anthony
Id it possible either web2py.js or jQuery is not loaded on that page? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com.

[web2py] Re: LOAD() not working

2013-08-11 Thread lesssugar
Both web2py.js and jquery.js are loaded and accessible. There are no JS errors shown in console, all looks normal - but there's none .load request sent at all. The few pages where LOAD doesn't work include a respective form and other javascript. Commenting the javascript doesn't solve the

[web2py] executesql insert multiple rows

2013-08-11 Thread ssuresh
I am trying to insert multiple rows into a postgresql table ..The SQL will look like this insert into mytable(col1,col2) values(val1,val2),(val3,val4),(val5,val6) Since the web2py batching just iterates and executes each sql statement, I am trying to avoid multiple db calls by using

Re: [web2py] Re: Testing if db insert was successful

2013-08-11 Thread Jordan Ladora
I see, thanks! On Sat, Aug 10, 2013 at 1:39 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: If it does not raise an exception it is successfull. The issue is that unless you are in a controller action you have to db.commit() or the insert will be un-committed. On Saturday, 10

[web2py] Database update doesn't reflect in view

2013-08-11 Thread sasogeek
in a function in default.py, i have this code #... if request.vars.uploader_id: uploaderid = request.vars.uploader_id uploader = db(db.auth_user.id==uploaderid).select() db(db.auth_user._id==uploaderid).update(**{'money':uploader[0].money+500})

[web2py] Re: Database update doesn't reflect in view

2013-08-11 Thread Anthony
Upon login, the auth.user object is stored in the session and is not updated again until next login (i.e., updating the db.auth_user record does not update auth.user). So, you'll have to explicitly update auth.user.money as well. Anthony On Sunday, August 11, 2013 12:42:45 PM UTC-4, sasogeek

[web2py] Request: Course about Web2py TDD + pledge for cash

2013-08-11 Thread Mika Sjöman
Hi I am trying to get started with TDD and web2py, but it is really hard since I do not have a CS degree. I have been studying this two courses at Coursera, and especially the former is awesome (I did not like the Intro to Systematic program design so much)

[web2py] Friendly URLs and routes.py

2013-08-11 Thread lesssugar
I need to create user profile URL based on user's name and last name, replacing all special characters with the allowed ones. How do I achieve this with routes.py? Can't find a straight answer on this subject in the book nor on the forum. -- --- You received this message because you are

[web2py] Re: SQLFORM.grid always show column sorter arrows

2013-08-11 Thread Niphlod
do you mean that you need in all headers the up/down arrows shown ? On Saturday, August 10, 2013 2:40:04 PM UTC+2, Jim S wrote: I have a requirement from a client to ALWAYS show the sorter arrows on the sort column in SQLFORM.grid. Anyone have a good way to turn that on globally? -Jim

[web2py] Re: db.py size

2013-08-11 Thread Christian Foster Howes
i personally like to break things into logical units. from an execution perspective i don't think it makes much of a difference how many files your model is broken into, but if there are groups of related tables that can be broken out it might make your editing much faster. On Sunday, August

[web2py] How to get url string params in Web2Py?

2013-08-11 Thread Hunt
Really stupid question here... but I can't seem to figure it out. In PHP when passing url params for say: www.mysit.com/index?name=steve I would use: $_GET[name] In web2py I know you can get stuff via request.vars.someNameAttribute for stuff like what text is within input box. But how

[web2py] Re: executesql insert multiple rows

2013-08-11 Thread Brian M
Sorry, not totally sure how to fix it, but what you've got now is quite confused. You've got just 2 placeholders in your SQL statement values(%s, %s) but 3 in placeholderlist so right there it isn't going to work. Plus, you don't want values([val1, val2], [val3, val4]) in the final SQL anyway

[web2py] Re: How to get url string params in Web2Py?

2013-08-11 Thread Anthony
request.vars.idnum GET variables are in request.get_vars, POST variables are in request.post_vars, and request.vars includes both the GET and the POST vars. Anthony On Sunday, August 11, 2013 5:52:43 PM UTC-4, Hunt wrote: Really stupid question here... but I can't seem to figure it out. In

[web2py] Re: How to get url string params in Web2Py?

2013-08-11 Thread Hunt
Ughhh. Feel really stupid... Forgot to set the method attribute in the form tag to post. Wow. Thanks Anthony! On Sunday, August 11, 2013 6:06:33 PM UTC-4, Anthony wrote: request.vars.idnum GET variables are in request.get_vars, POST variables are in request.post_vars, and request.vars

[web2py] Querying auth.user tables for a user with ____ attribute?

2013-08-11 Thread Hunt
Hello, How would I go about querying the auth.user tables for a user with a certain attribute? For a regular table I would do: comments = db(db.comments.some_attribute == lookingForThis).select() Not sure how to do this with the auth.user tables however. Thanks, Hunt -- --- You received

Re: [web2py] Re: SQLFORM.grid always show column sorter arrows

2013-08-11 Thread Jim Steil
Yes, just for the active sort. -Jim On Sun, Aug 11, 2013 at 4:04 PM, Niphlod niph...@gmail.com wrote: do you mean that you need in all headers the up/down arrows shown ? On Saturday, August 10, 2013 2:40:04 PM UTC+2, Jim S wrote: I have a requirement from a client to ALWAYS show the

[web2py] Re: Querying auth.user tables for a user with ____ attribute?

2013-08-11 Thread Joe Barnhart
There's nothing magic about the table auth_user. You can look at it in the database view (appadmin) of your application and see its fields. For example, if you want to query for a last name, just use the same syntax you'd use on any other table:

[web2py] Re: Querying auth.user tables for a user with ____ attribute?

2013-08-11 Thread Hunt
Wow... for some reason I had it in my mind that it was something way more complicated. Thanks Joe! On Sunday, August 11, 2013 10:36:38 PM UTC-4, Joe Barnhart wrote: There's nothing magic about the table auth_user. You can look at it in the database view (appadmin) of your application and

[web2py] I got those ol' datepicker blues!

2013-08-11 Thread Joe Barnhart
So I have this one field. It's a date -- a birthday in fact. It's definitely a date, and yet, I do NOT want the extra help of the datepicker on this PARTICULAR date. Oh, it's fine for those OTHER dates in my forms, just not THIS date. Boldly I set off to unhook my particular birth date