[web2py] Re: cross hair (full screen) display

2013-08-10 Thread Vineet
Yes But I now removed the css and put it before loading web2py css. jQuery is also loaded only once. Still the same problem. -- Vineet On Sunday, 11 August 2013 00:04:02 UTC+5:30, Anthony wrote: > > Are you putting the CSS code *after* all the CSS loaded by web2py? Are > you inadvertently loadin

[web2py] raise JSON Exception

2013-08-10 Thread archeaneon
I was wondering how I would go about raising a JSON exception in the same way HTTP(200, message) can be raised? Thanks again 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 ema

[web2py] Re: Passing extra arguments through a SQLFORM submit button?

2013-08-10 Thread hunt graham
Man. No luck from what either of you suggested... for some reason no mater what I put in the post_id field ends up as 0. Frustrating. I guess it doesn't really matter that much through if the best way to about is JS. Come to think of it it would be kind of weird if the whole page reloaded ev

[web2py] Re: querying database if a user exists, and retrieve fields if exists, is there a better way.

2013-08-10 Thread Anthony
{{user = db.auth_user(username=myuser) # should probably move this to the controller}} {{='%(first_name)s %(last_name)s' % user if user else 'user not a member of site'}} Note, there is no reason to use two separate queries to get the first and last name, and there is no reason to use the .as_

[web2py] Re: Creating Auth Groups

2013-08-10 Thread Rob Paire
This is helpful feedback, I will do some digging and see if I can figure out what is causing this behavior. And yes I see all my other tables which are in a different model file besides db.py; the only tables missing from the appadmin interface are the various auth tables. On Saturday, August 1

[web2py] sharing my d3.js experiments with web2py community

2013-08-10 Thread greaneym
Hi there, I am sharing my experiments with D3.js this week. It's Geek Week, according to Google and I tried some animations with svg and images. These are at htttps://github.com/greaneym/d3anim I tried adding them to the slices page but it didn't look like that worked. Also, please add a

[web2py] querying database if a user exists, and retrieve fields if exists, is there a better way.

2013-08-10 Thread Rob_McC
- This code is working, but... - is there a better or shorter way to accomplish this. ~ thanks for help. Rob {{ # QUESTION: # is there a more direct way of accomplishing this? # file: userinfo.html (a web2py view) # I'm logged in as # user: jdoe # this will return first_name

[web2py] Re: deployment to google app engine did not include my static files

2013-08-10 Thread Christian Foster Howes
you need to change some other parts of app.yaml to enable threadsafeyou can't use a cgi handler. i'll try and look up the answer in the next couple of days On Thursday, August 8, 2013 7:47:10 PM UTC-7, davedigerati wrote: > > Christian - I'm a total n00b so unable to help as much as I

[web2py] Re: Testing if db insert was successful

2013-08-10 Thread Massimo Di Pierro
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 August 2013 17:07:17 UTC+2, Jordan Ladora wrote: > > Hi, > > I'm unable to figure out how to check when a simpl

[web2py] Re: How to remove default exposure of JSON and XML and limit to HTML

2013-08-10 Thread archeaneon
Ah, thank you, I see now that it is written that in production they become disabled. On Saturday, August 10, 2013 2:19:41 PM UTC-4, Anthony wrote: > > If you are talking about the generic.json and generic.xml views, they are > disabled by default. However, in the welcome app, there is a line in

[web2py] Re: Creating Auth Groups

2013-08-10 Thread Anthony
> *My question is: *how do you edit the security tables using *appadmin*? > Browsing to: *[app]/appadmin/index* does not show any auth_??? tables. > What am I missing? > Does it show any tables? The auth tables should definitely be there if you have set things up properly. If necessary, pack

[web2py] Re: cross hair (full screen) display

2013-08-10 Thread Anthony
Are you putting the CSS code *after* all the CSS loaded by web2py? Are you inadvertently loading jQuery twice (once via the web2py layout.html code and once via the code you've copied from SO)? Anthony On Saturday, August 10, 2013 12:16:55 PM UTC-4, Vineet wrote: > > I am trying to display a fu

[web2py] Re: jquery .hide() interfering with validators

2013-08-10 Thread Anthony
field_A is validated. The problem is that when you submit the form without selecting a value for field_A, the reloaded page including the form errors initially hides field_A (including the error message below it). If you change the value of field_B and then change it again to "Choice 2", you wi

[web2py] Re: How to remove default exposure of JSON and XML and limit to HTML

2013-08-10 Thread Anthony
If you are talking about the generic.json and generic.xml views, they are disabled by default. However, in the welcome app, there is a line in db.py that enables all generic views for local requests only. Anthony On Saturday, August 10, 2013 6:40:36 AM UTC-4, arche...@gmail.com wrote: > > It se

[web2py] Re: Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Oops my bad - unrelated problem caused this - please disregard. o: Thanks. On Saturday, August 10, 2013 8:07:17 AM UTC-7, Jordan Ladora wrote: > > Hi, > > I'm unable to figure out how to check when a simple db insert() was > successful. In my code below, regardless of whether the db insert is

[web2py] cross hair (full screen) display

2013-08-10 Thread Vineet
I am trying to display a full screen cross-hair. When using the code given here --> http://stackoverflow.com/questions/12737615/html5-or-jquery-full-screen-crosshair-cursor If the code for cross-hairs is put in in web2py View, the web page does not display anything (just 2 hairs stationary at t

[web2py] Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Hi, I'm unable to figure out how to check when a simple db insert() was successful. In my code below, regardless of whether the db insert is successful or not, the code after 'if new_record:' always executes.. new_record = db.abc.insert(a='this', b='that', c='theotherthing') if new_record:

[web2py] jquery .hide() interfering with validators

2013-08-10 Thread Jordan Ladora
I have a SQLFORM.factory form that has multiple fields, one hidden by default in the view (via jquery) and shown when another field, a dropdown select, changes to some value. In the code below, field_A is shown if field_B 'Choice 2' is selected. The problem is that fields (eg field_A) which are sh

[web2py] SQLFORM.grid always show column sorter arrows

2013-08-10 Thread Jim S
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 -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this grou

[web2py] How to turn off all access to a controller other than html

2013-08-10 Thread archeaneon
It seems as if it's a bit of a lapse in security to have json and all other protocols exposed by default for a controller function, I was wondering why this is done and how to stop all but html exposure? Should I check the extension or is there some better way? -- --- You received this messa

[web2py] How to remove default exposure of JSON and XML and limit to HTML

2013-08-10 Thread archeaneon
It seems a bit of a security lapse to have the exposure of JSON and XML implicitly? I was wondering why this is set by default and what's the best way of going about changing that? Should I be checking for the extension? Thanks in advance. -- --- You received this message because you are sub

[web2py] Passing extra arguments through a SQLFORM submit button?

2013-08-10 Thread Jim Gregory
I think you should be able to set the value after you create the form in your controller: comment_form = SQLFORM(db.comment) comment_form.vars.post_id=post.id http://www.web2py.com/book/default/chapter/07#Pre-populating-the-form -- --- You received this message because you are subscribed t

[web2py] Re: Force user to reenter password to save auth.profile() changes

2013-08-10 Thread Massimo Di Pierro
This is what I would have done. Some caveats: 1) Use a SQLFORM.factory and not a SQLFORM because you do not want the value of the password field to be stored in db 2) You can validate the password using validators (I think) Field('password','passwrod',requires=(IS_CRYPT(),IS_EQUAL_TO((db.auth_u

[web2py] Re: Passing extra arguments through a SQLFORM submit button?

2013-08-10 Thread Massimo Di Pierro
You can but not advisable. You can for example, in controller, for post in posts: db.post_comment.post_id.default = post.id post.form = SQLFORM(db.post_comment, formname='x%s' % post.id).process() and in view replace {{=comment_form}} with {{=post.form}} but you end up generating and proce

[web2py] Re: How to keep database portability?

2013-08-10 Thread Massimo Di Pierro
This is a big transaction. Is this performed occasionally? Is this performed concurrently to other operations? Can it broken in smaller transactions? On Friday, 9 August 2013 19:16:42 UTC-5, Joe Barnhart wrote: > > The overall transaction looks like this: > > start the transaction > read 10-20