[web2py] Re: check boxes with is_in_set

2016-12-12 Thread Jim Russell
In your example, list_chart is not a list of strings, it is a list of tuples. In my code, hostnames is just a list of hostnames. e.g. ('hostname1.example.com','hostname2.example.com') I assume that you are trying to make the checkboxes default to true. For me, they defaulted to being

[web2py] Re: Problem with limitby?

2016-12-12 Thread Anthony
Run the following two queries using an external SQLite client (not web2py or the DAL): SELECT t_dog.id, t_dog.f_Dog_ID, t_dog.f_Name, t_dog.f_Breed, t_dog. f_Verified, t_dog.f_Lookup, t_dog.f_User, t_dog.uuid FROM t_dog WHERE (t_dog .id IN

[web2py] Re: Blog Template - Github

2016-12-12 Thread David
Sweet blog, Andrea! Simple and straight to the point. I made my blog just to beef up my resume and have something open sourced. My main project is jbtus.com a dating site. My blog is jbtus.com/blog That template was for a client I had and I could definitely add those things in there for

[web2py] Re: Blog Template - Github

2016-12-12 Thread Andrea Engel
> > Hi David, > I created a web2py blog as well a couple of month ago. So If you need some inspiration, here is the link: meadowlark.de I have to say, I don't maintain the blog on a regular basis as I just created it for myself to proof to myself I can do this. However, I think a blog archive,

[web2py] Re: Issues w/ Stripe?

2016-12-12 Thread Dave S
On Monday, December 12, 2016 at 6:04:24 PM UTC-8, Scott Hunter wrote: > > I have 2 appliances on a pythonanywhere web app, one a clone of the other, > both with a Stripe payment page. One of them works, the other does not; > when the form gets submitted, the one that fails shows the following

[web2py] Re: Problem with limitby?

2016-12-12 Thread Dave S
On Monday, December 12, 2016 at 3:55:27 PM UTC-8, Scott Hunter wrote: > > Web2py: version 2.14.6, on OSX (from source, python 2.7.x) and at > pythonanywhere (for the version that works properly). > Which DB engine are you using? /dps -- Resources: - http://web2py.com -

[web2py] Re: Problem with limitby?

2016-12-12 Thread Scott Hunter
This is the code for my grid: query = (db.t_classlevel.f_Trial==t.id)&(db.t_classlevel.id==db.t_run.f_Class_Level)&(db.t_run.f_Dog==db.t_dog.id) fields = [db.t_dog.f_Name,db.t_dog.f_Breed,db.t_dog.f_Dog_ID] dog_ids = [x.id for x in

[web2py] Issues w/ Stripe?

2016-12-12 Thread Scott Hunter
I have 2 appliances on a pythonanywhere web app, one a clone of the other, both with a Stripe payment page. One of them works, the other does not; when the form gets submitted, the one that fails shows the following on the browser console: [Error] Failed to load resource: the server

[web2py] Re: Problem with limitby?

2016-12-12 Thread Anthony
On Monday, December 12, 2016 at 6:55:27 PM UTC-5, Scott Hunter wrote: > > Web2py: version 2.14.6, on OSX (from source, python 2.7.x) and at > pythonanywhere (for the version that works properly). > > I think this is the SQL you are asking for: > > PRAGMA foreign_keys=ON; > > 0.01ms > > SELECT

[web2py] Re: Problem with limitby?

2016-12-12 Thread Scott Hunter
Web2py: version 2.14.6, on OSX (from source, python 2.7.x) and at pythonanywhere (for the version that works properly). I think this is the SQL you are asking for: PRAGMA foreign_keys=ON; 0.01ms SELECT auth_group.id, auth_group.role, auth_group.description FROM auth_group WHERE

Re: [web2py] Problem with limitby?

2016-12-12 Thread Scott Hunter
I am using the same orderby whether using limitby or not, as I stated. Thus, using orderby alone, I should get the same first 20 records in the same order as I would get by using limitby(0,20); I am not (again, as shown) In fact, I get the same sequence using limitby(0,20) as appears on the

[web2py] Re: check boxes with is_in_set

2016-12-12 Thread 黄祥
trying the tricks but got error when the checkbox is empty (1 or all checkbox is empty, when all checkbox is on its work) : *e.g.* def test_form(): redirect_url = 'test' list_chart = [(True, 'line'), (True, 'pie'), (True, 'bar') ] form = SQLFORM.factory( Field('chart', 'list:string',

[web2py] Re: form.process().accepted: question..

2016-12-12 Thread Anthony
You could instead use _readonly=True or put a copy in a hidden field with the same name. But keep in mind that you should still validate the data on the server. Alternatively, presumably you have access to the original value on the server from the database record, so why not just use that

[web2py] Re: Problem with limitby?

2016-12-12 Thread Anthony
What version of web2py? Also, show us the SQL generated by web2py (check db._timings, which you can view via response.toolbar()) as well as the SQL you are running. Anthony On Sunday, December 11, 2016 at 11:49:53 PM UTC-5, Scott Hunter wrote: > > I'm using a SQLFORM.grid, using a query of the

[web2py] Re: Subquery question

2016-12-12 Thread Gael Princivalle
I have to learn more about it. I've choose geometry as geography don't support st_within that'is the function that I need for testing in a point is inside a map area. Il giorno lunedì 12 dicembre 2016 20:46:47 UTC+1, Pierre ha scritto: > > > my guess is you are not "feeding" the geometry field

[web2py] Re: Subquery question

2016-12-12 Thread Pierre
my guess is you are not "feeding" the geometry field with the correct data the "natural" container for raw (default) lat lon is a geography field : *geography()* if instead you want to use a *geometry()*, you need to transform the original data from EPSG:4326 to another coordinates system I

[web2py] Permission Denied

2016-12-12 Thread J Boggy
[Error 13] Permission denied: 'root/myapp/applications/welcome/static/original/music.filename.8e.mp4 How should i granted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] jquery 1.12.2 vulnerability

2016-12-12 Thread Jacinto Parga
Hi, I have recently made a security analisys in a web application deployed with web2py in Google App Engine. A jquery 1.12.2 vulnerability was the result:

Re: [web2py] Problem with limitby?

2016-12-12 Thread Richard Vézina
Hello Scott, I am not sure I understand the problem... But for sure limit by alone will never return you the same set of results as you didn't specify the order in which you want the result to be and the analyser just favor the faster quering path... So don't expect limitby alone to return the

[web2py] Re: Blog Template - Github

2016-12-12 Thread Marlysson Silva
Awesome.. Great work.. -- 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

Re: [web2py] Re: Web2py with ngix

2016-12-12 Thread Richard Vézina
Hello Boggy, Are you installing web2py over your own server or or cloud service? If it your own server can you details what you have done so far, are you trying to install web2py by hand or you use one the scripts provided with web2py? Richard On Sat, Dec 10, 2016 at 2:21 AM, J Boggy

[web2py] Re: Blog Template - Github

2016-12-12 Thread David
It's up there! Thanks for the help, man. I had to create a new github repo because it was throwing me errors but here's the link: https://github.com/frontEndDevv/blog-template On Wednesday, December 7, 2016 at 2:03:15 PM UTC-6, David wrote: > > Hello, > > > I made my personal website with

[web2py] form.process().accepted: question..

2016-12-12 Thread António Ramos
i dont know how inside a form to block a field from users changing it. But I need the value of that field because its a computed field. If i do this db.table.uuid.widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _disabled=True) then in if form.process().accepted: form.vars.uuid=None

Re: [web2py] Re: Non-Editable field in SQLFORM

2016-12-12 Thread Fabiano Almeida
db.table.field.writable = False -> don't write db.table.field.readable = False -> don't show (hide) 2016-12-12 14:17 GMT-02:00 lyn2py : > It will always be allowed to take a value in insert, a value that you > assign it to, for example, via "default", like so: >

[web2py] Re: Non-Editable field in SQLFORM

2016-12-12 Thread lyn2py
It will always be allowed to take a value in insert, a value that you assign it to, for example, via "default", like so: db.table.field.default = some_value To make the field non-editable to the end user, use: db.table.field.editable = False ... form = SQLFORM(db.table) for the above examples,

Re: [web2py] Re: Forcing the translation of a text

2016-12-12 Thread Yoel Benitez Fonseca
It was my fault, all the time. I forgot that theres is some code in my model with create the new record before the segment i have share in this thread. Sorry for the time. 2016-12-12 9:43 GMT-05:00 Yoel Benitez Fonseca : > This not worked for me, the idea was to insert a

Re: [web2py] Re: Forcing the translation of a text

2016-12-12 Thread Yoel Benitez Fonseca
This not worked for me, the idea was to insert a folder record with the name in the user language, hence translating "My Dashboard" to anything if we got a translation string for that language. Apart from that part, all the texts are being translated without any problem, u 2016-12-12 9:09

Re: [web2py] Re: Forcing the translation of a text

2016-12-12 Thread Yoel Benítez Fonseca
On Sun, 11 Dec 2016 15:32:41 -0800 (PST) Marlysson Silva wrote: > You can overrride programatically the language getting accepted > language header from client using : > > language = response.headers['Accept-Language'].lower() > > T.force(language) I think got what is

[web2py] Re: Subquery question

2016-12-12 Thread Gael Princivalle
Thank you Pierre I've add this field to the db: Field('geopoint', 'geometry()', compute=lambda r: 'POINT({0} {1})'.format( float(r['longitude']),float(r['latitude']))), and I've also substitute the geometry filed with this new geopoint filed in the query: events_comments =

[web2py] Scheduler in systemd environment (running very long tasks)

2016-12-12 Thread Zbigniew Pomianowski
First of all: I decided to use web2py for my purposes becase it is awesome ;) I believe it is not a web2py's bug or anything like related thing. It can be more OS and systemd related issue. Let me explain what I do and what is the environment. I work in a lab where we try to automate many

[web2py] Re: Forcing the translation of a text

2016-12-12 Thread 黄祥
yes, it worked, learned it from web2py admin app (on bottom center, it used drop down language for change the language) just curious what is the difference with the header (accept-language) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Cannot impor module from application

2016-12-12 Thread J Boggy
When i setup web2py nginx web2py It created web2py app at /home/www-data But i don't permission to accept python installed library. how should i solve this to get permission. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Forcing the translation of a text

2016-12-12 Thread Marlysson Silva
I didn't knew about existence of the language key in cookies of response.. Great..One questions.. works? Em segunda-feira, 12 de dezembro de 2016 01:56:29 UTC-3, 黄祥 escreveu: > > what is the difference between? > T.force(request.cookies['language'].value) # learn from web2py admin app > and >

[web2py] Re: Blog Template - Github

2016-12-12 Thread Marlysson Silva
Great , I saw that you push your app in pack format.. You should push the application folder that includes controllers/models/views/ etc.. Give git init within application folder and do procedures above.. Em segunda-feira, 12 de dezembro de 2016 01:45:02 UTC-3, David escreveu: > > It worked

[web2py] Re: Subquery question

2016-12-12 Thread Pierre
don't know if this relates to your problem but I have had issues with the *geoPoint* object in the past and as soon as I removed it from my code everything worked fine. Try with : pt = 'POINT({0} {1})'.format(lon,lat) instead of a geoPoint -- Resources: - http://web2py.com -