[web2py] How to add users to a table row by request

2014-01-11 Thread Jon Smith
I am probably going about this all wrong, so I am open to suggestions. However I am wondering how I can append a user (if approved) to a table row. Currently I have a project_groups table and a tmp table as you can see below. The tmp table is meant as a place holder for users requesting access

[web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-11 Thread Simon Ashley
Often thought that it would be good to push this to another level. We have projects from time to time that would be good to outsource, if people were interested. Something like a project post board, with bidders, assignment, monitoring and completion. -- Resources: - http://web2py.com - http:

[web2py] Get label of field

2014-01-11 Thread Leonardo Pires Felix
I'm tryng to make the export classes export with fieldlabel instead of dbname.field. So i'm seeing that should be here where i should change: writer.writerow( [unicode(col).encode ("utf8") for col in self.rows

[web2py] calling custom javascript functions

2014-01-11 Thread Anthony
It's not quite clear what you want to do. You wouldn't use ajax to call a JavaScript function. If you want to call a JS function in the browser, just make sure it is loaded on the page and call it. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gith

[web2py] Re: Audio Streaming View

2014-01-11 Thread Asher S
I don't want to use the grid so I put the code in models, then in the view wrote: {{=URL('download', music.filename)}} but it still displays as a relative URL not the html5 audio embeded player. I must be missing something. Thank you for the reply Stifan! On Saturday, January 11, 2014 2:00:15 PM

[web2py] Re: calling custom javascript functions

2014-01-11 Thread Massimo Di Pierro
I suggest jQuery.ajax On Saturday, 11 January 2014 17:36:43 UTC-6, jonas wrote: > > hi > > I have developed javascript functions in /static/js/custom/charts.js > > they are loaded in layout.html: > > > > I call them in index.html by: > > > > myfunction(); > > > > I know that ajax and jQuery ca

[web2py] calling custom javascript functions

2014-01-11 Thread jonas
hi I have developed javascript functions in /static/js/custom/charts.js they are loaded in layout.html: I call them in index.html by: myfunction(); I know that ajax and jQuery can be used to call python functions in default.py and my question is, is it possible to use ajax or jQuery to

Re: [web2py] Re: Debugging with the scheduler

2014-01-11 Thread User
For future reference just adding the fact that you can open a web2py shell and call your scheduler tasks directly in order to debug them. This wasn't obvious to me but is much easier than trying to run the scheduler and debug it via logging statements. For example: python web2py.py -M -S you

[web2py] Re: Best practices with sessions

2014-01-11 Thread Wonton
Thank you very much Niphlod, a perfect explanation. On Thursday, January 9, 2014 9:29:25 PM UTC+1, Niphlod wrote: > > > > On Wednesday, January 8, 2014 10:41:49 PM UTC+1, Wonton wrote: >> >> Hello everyone, >> >> I'm trying to implement the web2py recipes to improve the efficiency and >> securit

[web2py] questions about using xml files in web2py

2014-01-11 Thread greaneym
Hi, I am learning about using xml files in web2py and have some questions. This controller allows me to view an xml file, from gluon.tools import Expose import osdef showtree3(): expath = '/Users/mgreaney/examples/ex_01.xml' return dict(files=Expose(expath)) This allows me to view the x

[web2py] Re: require based on another field.

2014-01-11 Thread 黄祥
IS_NULL_OR is deprecated, please use IS_EMPTY_OR ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators i think you can achieve it iwth IS_EMPTY_OR(IS_IN_DB() ) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Re: Audio Streaming View

2014-01-11 Thread 黄祥
pardon me, don't know what do you want to achieve in here. i think massimo guide, is show the html5 player in the grid. consider in this code : # tell web2py that links to music files are to be # represented as HTML5 audio embedded players from gluon.contrib.autolinks import expand_o

[web2py] Re: Need Suggestions on how to install the web2py app on android phone

2014-01-11 Thread 黄祥
> > I have built a web2py app which consists of a form that stores electrical > data info in a db. Now i need to install this app on an android phone. I > searched on internet for some answers but i couldnt find any productives so > i would like to ask what is the best,easiest way of doin this.

[web2py] Re: parse_as_rest, multiple fields to select

2014-01-11 Thread Massimo Di Pierro
No but it should be easy to add the ability to do it. I would use the syntax "/friend[person]/{person.id}/:field1,field2" Please open a ticket about this. On Saturday, 11 January 2014 12:47:02 UTC-6, Zbigniew Pomianowski wrote: > > Is it possible to use *parse_as_rest* function and select only p

[web2py] How to use a bootstrap button group as radio buttons in a custom form

2014-01-11 Thread David Gawlowski
hoping someone can point me in the right direction, as the post title says I want to use a btn-group {{=form.custom.begin}} Opt1 Opt2 etc etc as radio buttons to pass value to the form, but I am struggling with passing the value. How do I get the selected value the web2py w

Re: [web2py] Re: REF: DAL Catching errors

2014-01-11 Thread Teddy Nyambe
Thanks exactly what I was looking for, will try it! On 11 Jan 2014 19:00, "Anthony" wrote: > Good point. web2py normally does a rollback if a request results in an > exception, but if you catch the exception, you would need to do the > rollback yourself to prevent web2py from committing the trans

[web2py] parse_as_rest, multiple fields to select

2014-01-11 Thread Zbigniew Pomianowski
Is it possible to use *parse_as_rest* function and select only particular fields? I have quite big tables with many columns. From most of them I need to get only *id* and corresponding *name*. Whole rows I need only from time to time. In docs there is something like this: "/friend[person]/{per

Re: [web2py] Re: REF: DAL Catching errors

2014-01-11 Thread Anthony
Good point. web2py normally does a rollback if a request results in an exception, but if you catch the exception, you would need to do the rollback yourself to prevent web2py from committing the transaction at the end of the request. Anthony On Saturday, January 11, 2014 11:48:08 AM UTC-5, Mas

Re: [web2py] Re: REF: DAL Catching errors

2014-01-11 Thread Massimo Di Pierro
Depending on the situation it may also be necessary to do: try: except db._adapter.driver.IntegrityError as e: db.rollback() # or db.commit() return str(e) On Saturday, 11 January 2014 09:17:33 UTC-6, Anthony wrote: > > It depends on how the particular exception class is imple

[web2py] Re: helper function - query returns no rows

2014-01-11 Thread Anthony
I notice in your original code, you set form.vars.npc to 0 if it is empty -- does your new code do the same? We might need to see all the code. Anthony On Saturday, January 11, 2014 4:56:56 AM UTC-5, zee wrote: > > Hi, > > First post here, so thanks in advance for any help provided. > > I have a

Re: [web2py] Re: REF: DAL Catching errors

2014-01-11 Thread Anthony
It depends on how the particular exception class is implemented. In general, if you do str(error), you get the error message. I think in most exception classes, error.args[0] is also typically the error message. This is a general Python issue and not specific to web2py. try: except db.

[web2py] Re: GAE: insert using "key_name"

2014-01-11 Thread Alan Etkin
> Sorry for the confussion.. > But it works fine. I will definitally use this. > > (I posted something stupid and removed the stupid post but left some > traces. ;-)) > Well there are good reasons not to add the feature, at least with the current name: https://groups.google.com/d/msg/web2py-d

[web2py] Need Suggestions on how to install the web2py app on android phone

2014-01-11 Thread kartik murthy
Hello Folks! I have built a web2py app which consists of a form that stores electrical data info in a db. Now i need to install this app on an android phone. I searched on internet for some answers but i couldnt find any productives so i would like to ask what is the best,easies

[web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-11 Thread weheh
http://experts4solutions.com/ I've worked with a couple of the people on experts4solutions (I'm one myself) and it worked out well. On Saturday, January 11, 2014 3:31:20 PM UTC+8, Timothy Swieter wrote: > > Ruud - > > I'll take a look at the organization you linked too. On the face of it, >

[web2py] Re: Wiki.auth 401 error

2014-01-11 Thread Alan Etkin
> > Pretty much give up on this, the wiki looked very promising when i first > tried it, seems to be dead now, > Still unable to reproduce the issue with Version 2.8.2-stable+timestamp.2014.01.09.11.46.01 in development. Mind that you must have permission to create wikis. Check that there is a

[web2py] helper function - query returns no rows

2014-01-11 Thread zee
Hi, First post here, so thanks in advance for any help provided. I have a sub-routine in my main function of a a controller that looks like this : if form.vars.npc: pass else: form.vars.npc = 0 onrp_row = db( (db.npa.npa==form.vars.npa) &