Re: [web2py] Re: charts on web2py

2016-01-21 Thread Michele Comitini
If doing SVG client side covers your need then use raphael it is really simple, you need only to manage some json: http://raphaeljs.com/ Once you get the hang of SVG doing charts with SVG+ractive.js is also an option if you need maximum flexibility and interactivity. 2016-01-21 2:06 GMT+01:00

[web2py] Re: view

2016-01-21 Thread Anthony
When you display a Rows object in a view, it gets wrapped in SQLTABLE, which by default truncates values in each cell to 16 characters. To change that, you can call SQLTABLE explicitly: {{=SQLTABLE(form, truncate=None)}} Also, to make your code more clear, it might be better not to name a Rows

[web2py] Re: pygal and SQL.form

2016-01-21 Thread goome
tried with return dict(form=form,chart=chart) ? Il giorno mercoledì 20 gennaio 2016 14:47:16 UTC+1, kecajk...@gmail.com ha scritto: > > Hi Guys, > > I try to use pygal to draw some charts and it works fine. I used example > from: > > >

[web2py] view

2016-01-21 Thread goome
Does view truncate datas ? I have this in controller: [...] form = legacy_db(query).select() return dict (form = form) and the classic view: {{ extend 'layout.html' }} {{=form}} executing the funcition from the shell, i see the data correct(i mean the hole data) for example >>>

[web2py] Re: What does this error want to say? what's wrong here?

2016-01-21 Thread aston . ribat
'Cannot resolve reference auth_user in pst definition'On Thursday, January 21, 2016 at 2:53:02 PM UTC+5:30, aston...@gmail.com wrote: > > model: > db.define_table('pst', > Field('writeup','text'), auth.signature) > controller: > def authsign(): > form=SQLFORM(db.pst).process() >

[web2py] Re: What does this error want to say? what's wrong here?

2016-01-21 Thread aston . ribat
I found out that there was no auth_user in db administration. But why did it happen? It's new. And I erased no code On Thursday, January 21, 2016 at 2:53:02 PM UTC+5:30, aston...@gmail.com wrote: > > model: > db.define_table('pst', > Field('writeup','text'), auth.signature) > controller: >

[web2py] how to force uniqueness on list:reference or compute fields

2016-01-21 Thread Pierre
Hi all, have tried different options to do so but all have failed: list:reference + unique=Truefails list:reference + IS_NOT_IN_DB()fails compute field + unique=True fails compute field + IS_NOT_IN_DB() fails ?? -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-21 Thread Johann Spies
On 20 January 2016 at 16:35, Richard Vézina wrote: > > Which user is regular "web" user under debian, www-data? > > Yes. Thanks it is working now. Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] What does this error want to say? what's wrong here?

2016-01-21 Thread aston . ribat
model: db.define_table('pst', Field('writeup','text'), auth.signature) controller: def authsign(): form=SQLFORM(db.pst).process() return locals() view: {{extend 'layout.html'}} {{=form}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Enabling Google Sign-In

2016-01-21 Thread dirman
hi am getting global name 'Storage' is not defined when using Storage(json.load(f)['web']) On Thursday, October 22, 2015 at 11:27:35 AM UTC, mcm wrote: > > > http://web2py.com/books/default/chapter/29/09/access-control?search=oauth#Other-login-methods-and-login-forms > > > Grab the file

Re: [web2py] oauth2 for google

2016-01-21 Thread Marin Pranjić
from gluon.storage import Storage On Thu, Jan 21, 2016 at 3:51 PM, dirman wrote: > I am getting > > global name 'Storage' is not defined > > when using Storage(json.load(f)['web']) > > I need help > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-21 Thread Richard Vézina
:) Richard On Thu, Jan 21, 2016 at 4:05 AM, Johann Spies wrote: > On 20 January 2016 at 16:35, Richard Vézina > wrote: > >> >> Which user is regular "web" user under debian, www-data? >> >> > Yes. > > Thanks it is working now. > > Regards >

[web2py] oauth2 for google

2016-01-21 Thread dirman
I am getting global name 'Storage' is not defined when using Storage(json.load(f)['web']) I need help -- 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) ---

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Junior Phanter
Online - google chats http://google-developers.appspot.com/chart Offline - highcharts http://www.highcharts.com Em 21/01/2016 09:34, "Michele Comitini" escreveu: > If doing SVG client side covers your need then use raphael it is > really simple, you need only to

[web2py] Re: web3py

2016-01-21 Thread Alex
exactly :) maybe the point about auto imports brought up by Mirek is worth discussing. Personally I prefer the way it is and not having to write import request etc. in every controller. On the other hand it is bad for IDE support because you have to write something ugly (unless your IDE has

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Alex
my favorite chart library: https://www.amcharts.com/ very beautiful, easy to use, good documentation and friendly license (allows usage of free version even for commercial websites). Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: view

2016-01-21 Thread Marcello Console
Thank you a lot for all of your tips 2016-01-21 14:24 GMT+01:00, Anthony : > When you display a Rows object in a view, it gets wrapped in SQLTABLE, > which by default truncates values in each cell to 16 characters. To change > that, you can call SQLTABLE explicitly: > >

Re: [web2py] Re: web3py

2016-01-21 Thread Carlos Cesar Caballero Díaz
The imports can make web2py fast, because then only will be loaded the required models in the request, that maybe can be an optional feature. Another option could be caching the models in memory in production. Regards. El 21/01/16 a las 11:28, Alex escribió: exactly :) maybe the point about

[web2py] Re: probem reference auth_user sqlite

2016-01-21 Thread Niphlod
did you alter in any way the auth_user table ? On Thursday, January 21, 2016 at 8:43:07 PM UTC+1, Alessio Varalta wrote: > > Hi I have a database in sqlite..today I try to add new table..very simple > > db.define_table('viewnews', > Field('user_id','reference >

[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-21 Thread José Eloy
SOLVED: Niphlod: I copied the web2py folder inside C:\inetpub\wwwroot And then I created a new Web site, with main folder in C:\inetpub\wwwroot\web2py with https and port 443 and with a SSL certificate auto signed and vualá! my site is running. Thanks for the help. -- Resources: -

[web2py] Re: how to force uniqueness on list:reference or compute fields

2016-01-21 Thread Anthony
On Thursday, January 21, 2016 at 4:57:57 AM UTC-5, Pierre wrote: > > > Hi all, > > > have tried different options to do so but all have failed: > > list:reference + unique=Truefails > list:reference + IS_NOT_IN_DB()fails > compute field + unique=True fails > compute field +

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Diego Tostes
i am trying to use google chart plugin, but the example at http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is not so clear to me. anybody can show me a example with a controller and a view? i need a simple line chart. rgds diego 2016-01-21 17:36 GMT-02:00 Diego Tostes

[web2py] Web2py External Packages

2016-01-21 Thread Ionut Filea
Hello, I have a folder which is controlling one of my LED Matrix devices through a .py file. I would like to implement this folder into Web2py app browser and execute that .py file from web2py app. Would be very nice if I can get some answers on how to do it. Thank you, -- Resources: -

[web2py] Why does this Web2Py ajax call fail to return the value of a variable?

2016-01-21 Thread Ben Wolski
Here is the relevant snippet from my Web2Py view: {{for candidate in rows:}} {{=candidate.votes}} {{=IMG(_src=URL('photos',candidate.path_to_photo), _alt="Photo of Candidate")}} {{=candidate.name}} {{pass}} And the relevant snippet

[web2py] how to programatically create virtual fields in aliased table

2016-01-21 Thread Oliva Lemke
hi i have table db.define_table('items', Field('name'), Field('created_by'), Field('modified_by')) fields `created_by` and `modified_by` has defined relation to db.auth_user.user_id (not auth_user.id) how to programatically create virtual fields created_by.full_name and

[web2py] Re: best advice on customer/client picklist popup.

2016-01-21 Thread mrsalice Kolonga
hi -- 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 "web2py-users" group. To

[web2py] I want to execute a .py from a specific folder with web2py

2016-01-21 Thread Ionut Filea
Hello, I am new to this so take me easy. First, I just got my Web2py web up and working. What I would like to find out is where are my new Apps ('Test app', for this example) stored on my Raspberry Pi ? And second question would be: I have a folder for a Led Matrix. It is working if I use the

[web2py] Multiple instances of same class

2016-01-21 Thread killzane
I write a class in modules, and create instance in controller. But whatever I create different variable, they point to same instance. May I create new instance when page reload? here is the class # -*- coding: utf-8 -*- from gluon import current class Project: __name = None def __init__(self,

[web2py] Field does not belong to the table

2016-01-21 Thread Alex Glaros
What is causing this error? The inserts with the form used to work in sqLite but now am getting this error using PostGres form=SQLFORM.factory(db.SuperObject,db.Party,db.auth_user) ## ,db.PartyAddressIntersection,db.Address) if form.process().accepted: form.vars.displayName =

[web2py] Re: Field does not belong to the table

2016-01-21 Thread Alex Glaros
correction, I switched back to sqLite and problem exists there too -- 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

[web2py] Re: Multiple instances of same class

2016-01-21 Thread Anthony
You have defined __name as a class attribute, so it belongs to the class, not to individual instances of it. Instead, just use self.__name if you want the name to be associated with a particular instance of the class. Anthony On Thursday, January 21, 2016 at 5:24:00 PM UTC-5, killzane wrote: >

[web2py] Re: Why does this Web2Py ajax call fail to return the value of a variable?

2016-01-21 Thread Anthony
Answered on SO: http://stackoverflow.com/a/34903626/440323 On Thursday, January 21, 2016 at 5:24:00 PM UTC-5, Ben Wolski wrote: > > Here is the relevant snippet from my Web2Py view: > > > {{for candidate in rows:}} > > onclick="ajax('{{=URL('default', 'arrow_button_callback')}}',

Re: [web2py] Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2016-01-21 Thread Marcelo Huerta
> everything works fine with latest stable + postgresql 9.4 + psycopg2 > on win7. I'd say the fault could be a faulty web2py installation or at the > very least a driver issue (try to upgrade to the latest) And that was exactly it. I upgraded to the latest psycopg2 and the error stopped

[web2py] Re: I want to execute a .py from a specific folder with web2py

2016-01-21 Thread Jim S
Your applications should be installed in the applications folder under the web2py folder where you installed web2py. If you put your .py examples in the web2py/applications/modules you'll them be able to import them into your controllers. As I mentioned in the other question you posted, this

[web2py] Duplicate entries in Auth_user DB table upon sign in

2016-01-21 Thread Michael Messmer
When I use the following on SQLite manage_groups= True, manage_user = True, 1 entry in would come into db.auth_user When I transferred to Oracle 11g a new user logs in and I get two entries. 42 Mi Me [mme...mme@...NoneNoneNoneNone None 43 mme

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Junior Phanter
Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], ["watermelon", 0.5]]') #convert list in string and string in XML return dict(title=title, data=data) on view

[web2py] Re: Web2py External Packages

2016-01-21 Thread Jim S
Web2py will look in the modules folder inside your application folder for modules to import. I'd recommend at a minimum reading the Overview and Core chapters of the book before trying to write any code. http://web2py.com/books/default/chapter/29/03/overview

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Diego Tostes
thanks for all! 2016-01-21 14:17 GMT-02:00 Alex : > my favorite chart library: > https://www.amcharts.com/ > very beautiful, easy to use, good documentation and friendly license > (allows usage of free version even for commercial websites). > > Alex > > -- > Resources: > -

Re: [web2py] Re: Get return value from controller function via ajax

2016-01-21 Thread Ian W. Scott
Ah, thanks Anthony. I didn't realize that the third argument in the ajax() function was that flexible. That helps. Ian On Wed, Jan 20, 2016 at 4:45 PM, Anthony wrote: > Additionally, if you still want to use the ajax() function, the third > argument can be ":eval", in

[web2py] probem reference auth_user sqlite

2016-01-21 Thread Alessio Varalta
Hi I have a database in sqlite..today I try to add new table..very simple db.define_table('viewnews', Field('user_id','reference auth_user',requires=IS_NOT_EMPTY()), ) but when i insert a row a have this error Traceback (most recent call last): File

[web2py] Re: probem reference auth_user sqlite

2016-01-21 Thread Alessio Varalta
Resolve I don't know why but i change the name of the table and now work :) On Thursday, 21 January 2016 20:49:04 UTC+1, Niphlod wrote: > > did you alter in any way the auth_user table ? > > On Thursday, January 21, 2016 at 8:43:07 PM UTC+1, Alessio Varalta wrote: >> >> Hi I have a database in