[web2py] Re: Customize the RESTFUL service output

2016-02-16 Thread Dave S
On Saturday, February 13, 2016 at 9:33:57 AM UTC-8, Mamisoa Andriantafika wrote: > > Ok here is my answer: > > It took a while to make your answer work for me, partly because my POST() procedure didn't have a return. Eventually I got it figured out, after lots of flipping back and forth between

Re: [web2py] problem with sessions2trash.py

2016-02-16 Thread Dave S
On Tuesday, February 16, 2016 at 8:44:12 PM UTC-8, Richard wrote: > > Maybe, but don't understand why Mr Google provide me with this link in the > first place... > > If you were searching from the usual GG search box, it is surprising. If you searched using a general google search, it depends

Re: [web2py] problem with sessions2trash.py

2016-02-16 Thread Richard Vézina
Maybe, but don't understand why Mr Google provide me with this link in the first place... But anyway, thanks point this tricks... :) Richard On Tue, Feb 16, 2016 at 10:34 PM, Dave S wrote: > > > On Tuesday, February 16, 2016 at 6:51:47 PM UTC-8, Richard wrote: >> >> Found this : >> https://gr

[web2py] My web2py app adjusts according to the browser on mobile and look odd? How to load it like Chrome?

2016-02-16 Thread RAGHIB R
The background-image and everything looks curbed, not suited according to browser. How to always open a standard size like that which opens in google chrome? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

Re: [web2py] problem with sessions2trash.py

2016-02-16 Thread Dave S
On Tuesday, February 16, 2016 at 6:51:47 PM UTC-8, Richard wrote: > > Found this : > https://groups.google.com/forum/?hl=zh-TW#!topic/web2py/w742DgCajIo > > May apply, sorry I don't understand why google group display in asian > language but the thread message are in plain english... > Change

[web2py] Re: star or favorite an event or list

2016-02-16 Thread Dave S
On Tuesday, February 16, 2016 at 1:32:29 PM UTC-8, rajjm...@gmail.com wrote: > > Anyway ever did a star or favorite on something that is saved by reference > user to display later. Similar to craiglist or this google group even (like > attached) > > > Does this post help? https://groups.google.co

[web2py] Re: How to set default country in dropdown list

2016-02-16 Thread Dave S
On Tuesday, February 16, 2016 at 3:51:47 PM UTC-8, Winter Kryz wrote: > > > > > I created a module Countries.py with all the country names, imported into > my model db.py and > > from applications.Egressum.modules. > countries import * > ... > Field ('countries', requires = IS_IN_SET(COUNTRIES),

Re: [web2py] Re: charts on web2py

2016-02-16 Thread Junior Phanter
you Inserts jquery in your view? It works for me... ​ 2016-02-16 15:40 GMT-03:00 : > I got a blank screen. lol > > > On Tuesday, February 16, 2016 at 12:54:53 PM UTC-5, Junior Phanter wrote: > >> Use highcharts >> http://www.highcharts.com >> >> Example: >> >> *ON CONTROLLER* >> >> def chart():

Re: [web2py] problem with sessions2trash.py

2016-02-16 Thread Richard Vézina
Found this : https://groups.google.com/forum/?hl=zh-TW#!topic/web2py/w742DgCajIo May apply, sorry I don't understand why google group display in asian language but the thread message are in plain english... I didn't find any report of session2trash issue other then that... Richard On Tue, Feb 1

Re: [web2py] problem with sessions2trash.py

2016-02-16 Thread Richard Vézina
hmm hmm, 2.8.2 is pretty old... I am not sure, but I think I remember read about issue in sessions2trash script... I would start by investigating if that was really the case... Richard On Tue, Feb 16, 2016 at 7:33 PM, peter wrote: > I want to clean up sessions every 5 minutes. > > When I do > >

Re: [web2py] Re: one select form multiple table

2016-02-16 Thread Richard Vézina
I think like this you make you union search without worry about SQL injection : results = db(db.table1.field1 == '%{0}%'.format(form.vars.search)).select(db.table1.field1.with_alias('searchfield')) | db(db.table2.field2 == '%{0}%'.format(form.vars.search)).select(db.table2.fiel

[web2py] problem with sessions2trash.py

2016-02-16 Thread peter
I want to clean up sessions every 5 minutes. When I do nohup python web2py.py -S app -M -R scripts/sessions2trash.py & replacing app with my apps name, I get Traceback (most recent call last): File "web2py.py", line 18, in ? import gluon.widget File "/opt/web-apps/web2py/gluon/__init__.

[web2py] Re: Progress bars and session

2016-02-16 Thread Alfonso Serra
Thanks Anthony, it does work. The hack is easy to implement, but to represent the insertion of 30k records into the database, writing the session file and connecting 30k times might not be optimal. Theres a chapter about the Scheduler that may work for this. Ill read about it, it has something

[web2py] Re: How to set default country in dropdown list

2016-02-16 Thread Winter Kryz
I created a module Countries.py with all the country names, imported into my model db.py and from applications.Egressum.modules. countries import * ... Field ('countries', requires = IS_IN_SET(COUNTRIES), default='United States'), then when I go to execute it, I get the following error (

[web2py] Re: Progress bars and session

2016-02-16 Thread Anthony
Here's a hack that might work: def progress(): # when a form is submitted, change progress each second if request.post_vars: for i in range(5): session.progress = i # Write to the session file and unlock/close it. session._try_store_in_file(reque

[web2py] Re: Progress bars and session

2016-02-16 Thread Anthony
During a single request, the "session" object is just a copy of the session data stored in the session file. Any updates to the session during a request are not written back out to the session file until after the request has completed. So, in the progress() function, you are not updating the s

[web2py] Re: SQLFORM.factory - form.process().accepted fails first time but works after that

2016-02-16 Thread Anthony
Can you attach a minimal app that reproduces the problem? On Tuesday, February 16, 2016 at 4:17:04 PM UTC-5, Jim S wrote: > > I have a simple SQLFORM.factory form. > > Sometimes when I click on the submit button the > form.process(keepvalues=True).accepted returns False - clicking on enter > imm

[web2py] apache2/pam/pwauth to remove www-data from shadow group

2016-02-16 Thread kwebb
'm trying to get UNIX logins working using pam. I was able to get the user login to work if I add www-data to the shadow group. To get this working, I had to add www-data to the shadow group. This is considered a bad practice, and pwauth is possibly the solution. I was able to confgure pwau

[web2py] SQLFORM.factory - form.process().accepted fails first time but works after that

2016-02-16 Thread Jim S
I have a simple SQLFORM.factory form. Sometimes when I click on the submit button the form.process(keepvalues=True).accepted returns False - clicking on enter immediately following results in it returning True. I'm not getting any error or flash messages. I don't know where to begin looking f

[web2py] Progress bars and session

2016-02-16 Thread Alfonso Serra
Im trying to make a progress bar by reading and writing a session variable: There are 2 controllers: Get session.progress def getprogress(): print "getprogress:", session.progress return session.progress This one takes 5 seconds to perform and changes session.progress each one. def progre

[web2py] Re: Reporting app with Web2Py

2016-02-16 Thread Anthony
> > *Controller* > > def getcostdata(): > db.executesql (*get data on costs, for example*) > transform data > plotting library internals > > *View* > view data using plot library/html > > Questions: > 1. Should I use session variable and retrieve data from a dictionary - > build some kind of c

[web2py] Re: zip file length problem

2016-02-16 Thread Yebach
My mistake, I was looking at the wrong line of code, there is no data that comes to zipf.writestr I apologize Thank you anyway Sorry for not being factual about my problem On Tuesday, February 16, 2016 at 8:40:59 PM UTC+1, Niphlod wrote: > > how much is "lots" ? if it was a memory problem,

[web2py] Re: zip file length problem

2016-02-16 Thread Niphlod
how much is "lots" ? if it was a memory problem, the traceback would probably return something else... also... what's the line that raises the error ? On Tuesday, February 16, 2016 at 8:00:14 PM UTC+1, Yebach wrote: > > Hello > > I have a following problem > > When I try to serve a zip file to u

[web2py] zip file length problem

2016-02-16 Thread Yebach
Hello I have a following problem When I try to serve a zip file to user i get the following error Uncompressed size\nTypeError: object of type \'NoneType\' has no len() There is data to be compressed, but there is lots of it so this I believe is causing the problem my code is the following:

Re: [web2py] Re: charts on web2py

2016-02-16 Thread rajjmatthur
I got a blank screen. lol On Tuesday, February 16, 2016 at 12:54:53 PM UTC-5, Junior Phanter wrote: > > Use highcharts > http://www.highcharts.com > > Example: > > *ON CONTROLLER* > > def chart(): > > dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: > 'Mamão', y: 12}]" #Cha

Re: [web2py] Re: charts on web2py

2016-02-16 Thread Junior Phanter
Use highcharts http://www.highcharts.com Example: *ON CONTROLLER* def chart(): dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: 'Mamão', y: 12}]" #Change this dynamically dados_map={} dados_map["dados"]=dados_chart chart=""" Highcharts.setOptions({

[web2py] Re: one select form multiple table

2016-02-16 Thread Alfonso Serra
executesql always return tuples and thats ok unless you need to to hide columns, remove elements, edit or add data and such. To turn a tuple into a list is just result = list(result) To return a table web2py has many "magic" methods like SQLFORM.grid or SQLFORM.smartgrid that will only work if

[web2py] Re: Problems nginx on centos

2016-02-16 Thread Niphlod
leave nginx a part for now. start simple. run the included webserver, hit the page, see what happens. if it redirects, then it's your app's fault. if not, some weird config of nginx. and start from there upwards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: CAS with OpenSSL-Certificates

2016-02-16 Thread Niphlod
imho 2.7.10 and its certificate validation done by default is messing the consumer app. But you wouldn't absolutely be able to log in the consumer app... On Tuesday, February 16, 2016 at 3:31:05 PM UTC+1, Frank Bunt wrote: > > I'm trying to get CAS auth working with "https://.."; but it is givin

[web2py] Re: show_if logical operators

2016-02-16 Thread rajjmatthur
stumble upon this post. For some reason, this don't work: *model:* db.define_table('mytable', Field('name', type='list:string',requires=IS_IN_SET (['red', 'blue','yellow']),widget=lambda field, value: SQLFORM.widgets.checkboxes.widget(field, value, _style='bootstrap3_inline_fa

[web2py] Re: one select form multiple table

2016-02-16 Thread Imre
Thanks, it works but is tuple. How can I make a table from this records in view? 2016. február 1., hétfő 18:49:20 UTC+1 időpontban Alfonso Serra a következőt írta: > > I want to make a form which can search in multiple db tables. The tables >> has a same structure. >> > > the form is only on

Re: [web2py] Generator for web2py

2016-02-16 Thread Carlos Cesar Caballero Díaz
Hi Graham, I am very interested, but I can't find it in web2pyslices (maybe it still in moderation). Greetings. El 16/02/16 a las 09:01, Graham Ranson escribió: Further to my previous posting I have just published the details of my generator tool in web2pyslices. Just download and read throug

[web2py] Re: How to use Hightcharts in Web2py?

2016-02-16 Thread Massimo Di Pierro
You should use or the other else files are included twice and something may break. Anyway, the best way is using in layout.html after before . Make sure you use them in jQuery(function(){ ... code here ... }); On Tuesday, 16 February 2016 08:31:05 UTC-6, Jinyan Li wrote: > > I try to

[web2py] Re: form.vars details

2016-02-16 Thread Massimo Di Pierro
There are three web2py.gluon.storage.Storage objects (extend dict): request.post_vars (stores variables submitted via POST) request.get_vars (stores variables submitted via GET) request.vars (a superset) repeated variables are stored as lists. For example POST a=1&b=2&b=3 results in request.p

[web2py] How to use Hightcharts in Web2py?

2016-02-16 Thread Jinyan Li
I try to use Column with drilldown chart from Hightcharts for my website I put in layout.html also I put response.files.insert(3,URL('static','js/highcharts.js')) response.files.insert(4,URL('static','js/highcharts-3d.js')) response.files.insert(5,URL('static','js/highcharts-more.js')) resp

[web2py] Problems nginx on centos

2016-02-16 Thread Esau Hernandez Valles
Hi Forum: I tell you that I have a server with Centos 7.1 nginx 1.6.3 and mysql 5.6.28. Web2py versión is: 2.13.4-stable+timestamp.2015.12.26.04.59.39 My app saves sessions on bd. I put the following stament in db.py session.connect(request, response, db) Maybe it is preferable to store se

[web2py] CAS with OpenSSL-Certificates

2016-02-16 Thread frankbunt4711
I'm trying to get CAS auth working with "https://.."; but it is giving me problems. Below is my setup 1. Environment is ArchLinux (Banana M2) + RocketServer + Web2py: Web2Py 2.13.4, Rocket 1.2.6, Python 2.7.10 All databases running on SQLite, default app path. 2. I have one web2py app that acts

[web2py] Reporting app with Web2Py

2016-02-16 Thread lungupconstantin
Hi everyone, First of all I would like to say thanks to Massimo and the entire community for the great job you're doing :) I am building a Reporting application for my graduation paper for an example company with Web2Py. I am using MySQL (a reporting DB and a denormalized datamart for ROLAP t

[web2py] form.vars details

2016-02-16 Thread Ayman Absi
Hello, >From Web2Py documentation I read this "accepts stores those variables that pass validation into form.vars" but I can't find any documentation tells what form.vars looks like. for example in some places in the document we can find that there is form.vars.id. Is there any place I can fin

[web2py] Generator for web2py

2016-02-16 Thread Graham Ranson
Further to my previous posting I have just published the details of my generator tool in web2pyslices. Just download and read through the how to use document at least. I will, yet again, point out that this is a work in progress with lots of gaps and almost certainly a few bugs and certainly wi