[web2py] Graphs , using of Google charts in web2py app should be easy.

2014-01-15 Thread webpypy
Hi, It is easy, no json, no plugin. Pass the query results to the view return dict(projects=projects) Copy the snippet in the view. https://google-developers.appspot.com/chart/interactive/docs/quick_start replace this part data.addRows([ ['Mushrooms', 3], ['Onions',

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Kiran Subbaraman
Hmm, I was planning to use keepvalues for the following scenarios: * Scenario1 - submitted form returns with errors, and still displays the form with the submitted values * Scenario2 - submit form successfully, and still display the form with the submitted values You mention that the kee

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Anthony
On Wednesday, January 15, 2014 3:47:28 AM UTC-5, Kiran Subbaraman wrote: > > Hmm, I was planning to use keepvalues for the following scenarios: > >- Scenario1 - submitted form returns with errors, and still displays >the form with the submitted values > - Scenario2 - submit form succ

[web2py] Re: How to add a column?

2014-01-15 Thread Adrian Zhang
The explanation is really help. Especially to me, a newbie of web2py and even development. On Tuesday, November 6, 2012 5:04:36 AM UTC+8, Niphlod wrote: > > in the "normal" way (i.e. a new Field(), with of course nothing set to > prevent migrations, such as migrate=False in the table def, migrat

[web2py] DAL read and variables

2014-01-15 Thread DAL read and variables
Hi guys, this question is about tree things at once. The first on is as follow: I have this code: [code] in the models (not so importantthis part works fine): dba = DAL('mysql://web2py:test@localhost/testdb') dba.define_table('person', Field('name', requires=IS_NOT_EMPTY()), Field('email', req

[web2py] where can I find older versions ?

2014-01-15 Thread Stef Mientki
hi, where can I find older versions, because the latest version gives me this error wcscpy_s cound not be located in msvcrt.dll (winXP, 32 bit) cheers, Stef -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] uploaded files not deleted on cascade deletion

2014-01-15 Thread maurizio
I all, problem on deleting files loaded, if delete/update a record in allegato table then documento in uploads folder being deleted/updated correctly. if delete a record in prodotto table records in allegato table are correctly CASCADE deleted, but files in uploads folder still remain. an

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

2014-01-15 Thread kartik murthy
Thanks a lot for the detailed answers. Much Appreciated! On Sunday, 12 January 2014 03:18:51 UTC+5:30, 黄祥 wrote: > > 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 s

[web2py] upload e CASCADE delete

2014-01-15 Thread maurizio
Hi all, probably due to my incompetence I have the following problem, Thank's in advance anyone who wants to help me. consider the following code: ''' db.define_table('prodotto', Field('nome'), format='%(nome)s', plural='prodotti') db.define_table('allegato', Fiel

[web2py] caching TAG()

2014-01-15 Thread Calvin
Hi I'm getting the following error(s) when caching a TAG() element: File "/path/to/projects/web2py/gluon/globals.py", line 372, in self._caller = lambda f: f() File "/path/to/projects/web2py/gluon/tools.py", line 3239, in f return action(*a, **b) File "/path/to/projects/web2py/gluon

Re: [web2py] detect a specific device

2014-01-15 Thread Ricardo Pedroso
On Tue, Jan 14, 2014 at 9:23 AM, Paolo Valleri wrote: > Hi all, > I'd develop a web2py responsible app instead of an android app; at a first > sight it seams to some extent feasible. The only issue is related to an > unusual requirement, the web2py app (running on an intranet) must be > accessible

[web2py] Re: Dynamic form generation using FORM()

2014-01-15 Thread Tim Richardson
out of curiosity why not use SQLFORM.grid with selectable? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subs

[web2py] crud form errors

2014-01-15 Thread sasogeek
I have a crud login and registration form with my own html, I don't extend the layout.html. How do I display the form errors when a user submits empty or invalid inputs? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] where can I find older versions ?

2014-01-15 Thread Richard Vézina
Github pick a tag download... Richard On Tue, Jan 14, 2014 at 7:28 PM, Stef Mientki wrote: > hi, > > where can I find older versions, > because the latest version gives me this error > > wcscpy_s cound not be located in msvcrt.dll > > (winXP, 32 bit) > > cheers, > Stef > > -- > Resources: > -

[web2py] Re: crud form errors

2014-01-15 Thread Anthony
Error messages are in form.errors.fieldname (if it is None, there is no error for that field). On Wednesday, January 15, 2014 8:49:23 AM UTC-5, sasogeek wrote: > > I have a crud login and registration form with my own html, I don't extend > the layout.html. How do I display the form errors when

[web2py] Re: upload e CASCADE delete

2014-01-15 Thread Anthony
The cascading delete is handled by the database, so the web2py DAL is not executing the delete from the db.allegato table and therefore doesn't have the opportunity to run the _before_delete and _after_delete callbacks (the former is used to autodelete uploaded files). I suppose you could creat

[web2py] Re: caching TAG()

2014-01-15 Thread Leonel Câmara
Just save the generated xml instead cache.disk('Hello', lambda: CAT(P('Hello'), SMALL('World')).xml(),time_expire =100) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Select scalar?

2014-01-15 Thread User
Is there a convenience method to select a scalar value from a database table? What I do currently is: db(db.customer.id == 5).select(db.customer.first_name).first().first_name If not would it make sense to add one? Seems like a reasonably common use case. Maybe something like db(db.customer

[web2py] controller not returning java script variable correctly

2014-01-15 Thread jonas
Hi I have a controller that is supposed to return a list to a js function (for testing purposes): def test(): print "called2" data=[3, 6, 2, 7, 5, 2, 0, 3, 8, 9, 2, 5, 9, 3, 6, 3, 6, 2, 7, 5, 2, 1, 3, 8, 9, 2, 5, 9, 2, 7] return 'var data=%s;' % data I am calling this with an

[web2py] Re: Select scalar?

2014-01-15 Thread Anthony
db.customer(5).first_name See http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Fetching-a-Row . Anthony On Wednesday, January 15, 2014 10:49:30 AM UTC-5, User wrote: > > Is there a convenience method to select a scalar value from a database > table? > > What I do cu

[web2py] Re: controller not returning java script variable correctly

2014-01-15 Thread Anthony
Javascript is asynchronous -- the document.write() line will be executed before the ajax call has completed. Try putting the document.write() in the returned Javascript itself. On Wednesday, January 15, 2014 11:09:04 AM UTC-5, jonas wrote: > > Hi > > I have a controller that is supposed to retur

[web2py] Re: caching TAG()

2014-01-15 Thread Calvin
Thanks Leonel! That works. I ended up doing it as follows: SMALL = lambda x, **kwargs: XML(TAG.small(x, **kwargs).xml()) cache.disk('Hello', lambda: CAT(P('Hello'), SMALL('World')), time_expire=100 ) However, with such an approach, the retrieved cache value is a string rather than an XML objec

Re: [web2py] request.uri_language

2014-01-15 Thread Jonathan Lundell
On 13 Jan 2014, at 7:48 AM, Gael Princivalle wrote: > That's a good solution, thanks. > > In the meantime I've found that you have to specify with C=...the controller > and f=... the functiuon in the URL helper. > > That like that it works fine: > {{response.menu.append(('IT', False, URL('it',

Re: [web2py] Re: Dynamic form generation using FORM()

2014-01-15 Thread Chris Hepworth
I actually have a very odd data set that is getting put into the form. They represent several different tables and the only real unifying feature is the uploaded photos. The idea is to fetch a list of photos to retrieve for the user using a single form. That is why the checkbox value is the encrypt

[web2py] Re: Data Fixtures

2014-01-15 Thread Massimo Di Pierro
It is in the manual. We just do not call this "fixtures" python web2py.py -S app -M >>> db.export_to_csv_file(open('dump','w')) rm applications/app/databases/* python web2py.py -S app -M >>> db.import_from_csv_file(open('dump')) >>> db.commit() Done. On Tuesday, 14 January 2014 01:21:47 UTC-6,

[web2py] Re: Web2py Integration with Sentry

2014-01-15 Thread Massimo Di Pierro
Always. :-) Rules are simple. I always take a patch if: 1) fixes a security issue OR 2) does not break backward compatibility AND 3) makes web2py faster OR 4) add a new functionality without making previous behavior slower On Wednesday, 15 January 2014 00:41:54 UTC-6, James Q wrote: > > Massimo:

[web2py] Re: Graphs , using of Google charts in web2py app should be easy.

2014-01-15 Thread Massimo Di Pierro
:-) On Wednesday, 15 January 2014 02:02:32 UTC-6, webpypy wrote: > > Hi, > > It is easy, no json, no plugin. > > Pass the query results to the view > return dict(projects=projects) > > Copy the snippet in the view. > https://google-developers.appspot.com/chart/interactive/docs/quick_start > > repl

Re: [web2py] Re: controller not returning java script variable correctly

2014-01-15 Thread Jonas Fredriksson
ok, now I undestand what you mean: def test(): print "called2" data3=[3, 6, 2, 7, 5, 2, 0, 3, 8, 9, 2, 5, 9, 3, 6, 3, 6, 2, 7, 5, 2, 1, 3, 8, 9, 2, 5, 9, 2, 7] return 'graph1(%s);' % data3 ajax('{{=URL('test')}}',[],':eval'); graph1 is the actual function, the write function w

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Kiran Subbaraman
Anthony, Thanks for the explanation. Went ahead and created widgets, and things work just fine. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Wed, 15-01-2014 2:28 PM, Anthony wrote: On Wednesday, January 15, 2014 3:47:28 AM UTC-5, Kiran Su

Re: [web2py] Re: controller not returning java script variable correctly

2014-01-15 Thread Anthony
> > graph1 is the actual function, the write function was just for testing. > This works but it means that I have to make a python function for every js > function call when passing values from python functions. > You can do this: def test(): data = ... return '%s(%s);' % (request.args

[web2py] Validators - default messages

2014-01-15 Thread Kiran Subbaraman
I was just using some of the validators, like IS_EMAIL(), IS_NOT_EMPTY(), and noticed that the error messages that it returns do not have the first character capitalized. Basically I see error messages like '*e*nter a valid email address'; I expected to see something like this '*E*nter a valid e

[web2py] Re: Validators - default messages

2014-01-15 Thread Anthony
On Wednesday, January 15, 2014 1:47:26 PM UTC-5, Kiran Subbaraman wrote: > > I was just using some of the validators, like IS_EMAIL(), IS_NOT_EMPTY(), > and noticed that the error messages that it returns do not have the first > character capitalized. > Basically I see error messages like '*e*n

Re: [web2py] Re: controller not returning java script variable correctly

2014-01-15 Thread Jonas Fredriksson
nice solution and it works. thanks On Wed, Jan 15, 2014 at 7:34 PM, Anthony wrote: > graph1 is the actual function, the write function was just for testing. >> This works but it means that I have to make a python function for every js >> function call when passing values from python functions.

[web2py] Re: forgot password not working anymore

2014-01-15 Thread pang
I have the same problem, and it doesn't work remotely. Just for reference, I saw it is corrected in the latest version. It was line 2918 in tools.py: user = table_user(**{userfield:form.vars.get(userfield)}) instead of user = table_user(**{userfield:form.vars.email}) Regards El m

Re: [web2py] where can I find older versions ?

2014-01-15 Thread Niphlod
he's seeking the binary. https://code.google.com/p/web2py/issues/detail?id=1809 However, I still can't reproduce the issue. You can download the 2.8.2 version that is not giving the error here https://www.dropbox.com/s/4o7ld0vmy9pl9g8/web2py_exe.py2exe.7z On Wednesday, January 15, 2014 3:19:1

[web2py] Grid in component edit twice issue

2014-01-15 Thread Jim Karsten
I have a grid inside a component. When I click the 'Edit' button on a row, submit the Edit form, then click the 'Edit' button a second time, the page reloads with only the component. Controllers: def index(): """Container controller.""" return dict() def people(): """Grid con

[web2py] Bug in DAL with SQLFORM, upload field and required field ???

2014-01-15 Thread Ivan Gazzola
I've this table: db.define_table("Consulenze", Field('dentista','reference Nominativi', required=True), Field('data_inizio_collaborazione','date'), Field('data_fine_collaborazione','date'), Field ('percentuale','integer'), Field('logo','upload')) In console insert and upda

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-15 Thread Anthony
What value of dentista is being inserted, and have you confirmed that that value is the id of one of the records in the Nominativi table? On Wednesday, January 15, 2014 5:56:18 PM UTC-5, Ivan Gazzola wrote: > > I've this table: > db.define_table("Consulenze", > Field('dentista','reference Nom

[web2py] Re: Bootstrap3 package - help to test

2014-01-15 Thread LightDot
Hm. I expected a flurry of responses by now. I haven't been able to work on this since Christmas, but... come on, anyone?? :) I would think a possibility of Bootstrap 3 and Zorb Foundation 5 welcome apps would draw crowds... Anyway, layout.html: - web2py.css needs minor adjustments as there are

[web2py] Re: Graphs , using of Google charts in web2py app should be easy.

2014-01-15 Thread 黄祥
wonthefull thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Go

[web2py] Re: where can I find older versions ?

2014-01-15 Thread Alex Glaros
to get 2.8.2 to work restore to earlier Windows version to remove the DLL error is it possible that 2.8.2 changes DLL, maybe indirectly? On Tuesday, January 14, 2014 4:28:06 PM UTC-8, aapaap wrote: > > hi, > > where can I find older versions, > because the latest version gives me this error

[web2py] Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-15 Thread weheh
I want to embedded a javascript-based xhtml editor in my app (much like the editor in Google groups that I'm using to type this note). The editor should work seamlessly with web2py. It must be extensible as I need to add modifications. I want it to be able to handle basic html tags (, ... , et

[web2py] Re: How to add a column?

2014-01-15 Thread Alex Glaros
helpful explanation thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "w

[web2py] scheduler question

2014-01-15 Thread Jayadevan M
A couple of questions about web2py scheduler - 1) I have configured web2py using nginx znd uwsgi on CentOS. These services will automatically restart if the server reboots. How can I ensure that web2py scheduler also restarts? 2) Is this the right way of starting the scheduler from command line?

[web2py] Re: Validators - default messages

2014-01-15 Thread Kiran Subbaraman
Done. Issue: https://code.google.com/p/web2py/issues/detail?id=1853, and sent a pull-request too. On Thursday, January 16, 2014 1:06:11 AM UTC+5:30, Anthony wrote: > > On Wednesday, January 15, 2014 1:47:26 PM UTC-5, Kiran Subbaraman wrote: >> >> I was just using some of the validators, like IS_

[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-15 Thread Simon Ashley
+1 CKeditor seems to work fine, generically linked to text based widgets in models. No heavy demands/ extensions through. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-15 Thread weheh
Good to hear that, since I just downloaded it. THANKS On Thursday, January 16, 2014 2:18:35 PM UTC+8, Simon Ashley wrote: > > +1 CKeditor seems to work fine, generically linked to text based widgets > in models. No heavy demands/ extensions through. > -- Resources: - http://web2py.com - http://