Re: [web2py] Re: Small Monitoring App causes Python to struggle (100% CPU Load on Raspberry Pi 3)

2017-02-14 Thread Kiran Subbaraman
Took a look at the rsn (profile), and yes, almost 99% of the time is spent in `select.select` . This happens to be: https://docs.python.org/2/library/select.html#select.select . Guessing something to do with the network setup ... not sure though. The issue doesn't seem to be with your

[web2py] SQLFORM.grid field.represent not working with joined tables

2017-02-14 Thread Paul Ellis
I have have a grid with a left outer join. So the row objects look like this: I am trying to use represent to make some of them editable. For the optional checkbox it is like this: db.product_offer_item.optional.represent = lambda value, row: INPUT(_type='checkbox',

[web2py] Re: Query on a field from a referenced field

2017-02-14 Thread Leonel Câmara
One way to do it would be to use *belongs* user_event_ids = db(db.events_users.created_by == auth.user.id)._select(db. events_users.going_event) going_events = db((db.events.event_datetime >= request.now) & db.events.id. belongs(user_event_ids)).select() -- Resources: - http://web2py.com -

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread António Ramos
havent used vue since dec 2015 but it was working like a charm with web2py... here is my code , use it just to get some ideas... Create a js file and place it inside static folder... main.js (function ($, Vue) { String.prototype.replaceAll = function(str1, str2, ignore) { return

Re: [web2py] Issue width auht.has_mermbership in menu.py

2017-02-14 Thread Jacinto Parga
Yes, because the error appears again. My db.py # -*- coding: utf-8 -*- # ## This scaffolding model makes your app work on Google App Engine too ## File is released under public domain and you can use without limitations

[web2py] Re: web2py.component equivalent for =LOAD

2017-02-14 Thread shamimur . rahman
just realized there are some typo... so is it web2py.component('{{=URL('default', 'test.load',args=['lspci'])}}', target='component1') =LOAD is working but it does automatic rendering, I want to do the same after the webpage had been loaded, so want to use web2py.component inside

[web2py] Query on a field from a referenced field

2017-02-14 Thread Gael Princivalle
Hello. Calling a field from a referenced field is not possible. Ticket is 'Field' object has no attribute 'event_datetime'. Model: db.define_table('events', Field('title', type='string'), Field('event_datetime', type='datetime'), auth.signature) db.define_table('events_users',

Re: [web2py] Re: Fullcalendar scheduler - creating, changing and saving data to database

2017-02-14 Thread Richard Vézina
I use to develop a custom python calendar tools with web2py 2-3 years ago... We did pass a lot of the early calendar type issue like isoweek and sunday-to-saturday, I can't say it bugless from this side, but I am confident it always return proper year-month-week-day... I had event table (with

[web2py] Re: Small Monitoring App causes Python to struggle (100% CPU Load on Raspberry Pi 3)

2017-02-14 Thread Leonel Câmara
Also have you tried postgresql and psicopg2 instead of mysql, this may be a driver problem? -- 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

[web2py] Re: Web2py Websocket in Rest

2017-02-14 Thread nexususer68
while you can make a restful api with web2py you can't do websocket with web2py you will need an async web server with a non blocking framework (something like tornado ...) if you will only request resources using websockets there is no benefit from using web2py but if you want to use

[web2py] web2py.component equivalent for =LOAD

2017-02-14 Thread shamimur . rahman
What is the equivalent of following when using web2py.component() ? {{=LOAD('default', 'test.load', args=[''lspci'], ajax=True)}} is it ? web2py.component('{{=URL('default', 'test2.load',args=['dmesg'])}}', target='component1') -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Small Monitoring App causes Python to struggle (100% CPU Load on Raspberry Pi 3)

2017-02-14 Thread Leonel Câmara
> > - It was not possible to use response.json(ret) directly. For any reason > my jquery script doesn't accept the header of the returned json file (I > haven't analyzed that problem in detail, but I think thats not the point). > The python process shows the same behaviour with or without this

[web2py] Re: Calling controller from javascript

2017-02-14 Thread Anthony
On Monday, February 13, 2017 at 8:50:37 AM UTC-5, Andrea Fae' wrote: > > Why ajax('{{=URL('test', '')}}',[],''); it's not working? " 'test' is a > normal controller for test with a view very simple - see below > > eventDrop: function(event, delta, revertFunc) { > if

[web2py] Re: Passing variables

2017-02-14 Thread Anthony
> > var value = 23; >> ajax('{{=URL('default', 'test')}}', ['value'], ''); >> > > 'value' should be the name of an input field in a form. > More specifically, the second argument to ajax() is a list of form input names -- it is not a list of Javascript

[web2py] Re: info: interesting hack, sort in IS_IN_DB lists with regard to current locale

2017-02-14 Thread Anthony
On Tuesday, February 14, 2017 at 4:47:49 AM UTC-5, Mirek Zvolský wrote: > > Thanks, Anthony. > When I have some time maybe I will do more experiments. > With sort=True I was (earlier) not sucessful. Because I think I need a > lambda to set the order, boolean is not enough. > Inside options() I

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread Dave S
On Tuesday, February 14, 2017 at 2:55:30 AM UTC-8, John Philip wrote: > > Hi Ramon, > > since you've had experience using vuejs in web2py I thought I'd ask you. I > am using a vuejs component library to display a table from a json dataset. > > var Main = { > data() { > return { > tableData:

[web2py] Re: Form submission not working using ajax to display form in content div

2017-02-14 Thread Edwin Haver
Hi Donald, I tried that and it does not make a difference. Regards, Edwin. On Tuesday, February 14, 2017 at 12:58:19 AM UTC+4, Donald McClymont wrote: > > I haven't studied all of this but can you change the name of your > controller function to something other than form. I have had issues

Re: [web2py] Issue width auht.has_mermbership in menu.py

2017-02-14 Thread Richard Vézina
Can you show us more of your conf, there is maybe other things involve here. Richard On Tue, Feb 14, 2017 at 4:50 AM, Jacinto Parga wrote: > Hi, > I have had google appengine error like this: > > >

[web2py] Re: advice for a GAE warmup function

2017-02-14 Thread Carl Hunter Roach
a typo! GAE (Google App Engine) warmup as document here https://cloud.google.com/appengine/docs/python/warmup-requests/ in a platform-agnostic way. On Thursday, 9 February 2017 14:16:32 UTC, Carl Hunter Roach wrote: > > > Anyone with advice on what to put in a GAW warmup() function ( >

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread 'John Philip' via web2py-users
I apologize I meant Ramos...sorry typo. On Tuesday, February 14, 2017 at 11:55:30 AM UTC+1, John Philip wrote: > > Hi Ramon, > > since you've had experience using vuejs in web2py I thought I'd ask you. I > am using a vuejs component library to display a table from a json dataset. > > var Main =

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2017-02-14 Thread 'John Philip' via web2py-users
Hi Ramon, since you've had experience using vuejs in web2py I thought I'd ask you. I am using a vuejs component library to display a table from a json dataset. var Main = { data() { return { tableData: get_json_data_from_web2py_table } }, methods: { formatter(row, column) { return

[web2py] Re: info: interesting hack, sort in IS_IN_DB lists with regard to current locale

2017-02-14 Thread Mirek Zvolský
# http://stackoverflow.com/questions/11121636/sorting-list-of-string-with-specific-locale-in-python import icu # PyICU def sorted_strings(strings, locale=None): if locale is None: return sorted(strings) collator = icu.Collator.createInstance(icu.Locale(locale)) return

[web2py] Re: info: interesting hack, sort in IS_IN_DB lists with regard to current locale

2017-02-14 Thread Mirek Zvolský
Thread-safe... In doc I read following: Applications typically start with a call of import localelocale.setlocale(locale.LC_ALL, '') This sets the locale for all categories to the user’s default setting (typically specified in the LANG environment variable). If the locale is not changed

[web2py] Issue width auht.has_mermbership in menu.py

2017-02-14 Thread Jacinto Parga
Hi, I have had google appengine error like this: Any auth.has_membership in menu.py raised this error. I finally solved setting *myconf =

[web2py] Re: info: interesting hack, sort in IS_IN_DB lists with regard to current locale

2017-02-14 Thread Mirek Zvolský
When I have some time maybe I will do more experiments. With sort=True I was (earlier) not sucessful. Because I think I need a lambda to set the order, boolean is not enough. Inside options() I had (earlier) the set_trace point but I wasn't successful to stop the execution there. Not sure if it

[web2py] Re: info: interesting hack, sort in IS_IN_DB lists with regard to current locale

2017-02-14 Thread Mirek Zvolský
Thanks, Hiphlod. Does this mean that 1) I cannot use locale module at all, 2) I cannot switch more different locales/languages and I have to import and set locales at modules "root" level, 3) I cannot switch more different locales/languages, but I can set them in model (like I do) ? I think 3)

Re: [web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2017-02-14 Thread Jacinto Parga
I just did a workaround with my own password reset function. El miércoles, 5 de octubre de 2016, 1:46:41 (UTC+2), webm...@trytha.com escribió: > > So has this and the DAL issue with GAE been addressed? Should I try the > latest version of web2py or is it a waste of time? I'd really prefer to

[web2py] Re: jquery 1.12.2 vulnerability

2017-02-14 Thread Jacinto Parga
Yeap thanks El miércoles, 14 de diciembre de 2016, 20:36:49 (UTC+1), Niphlod escribió: > > you are free to use whatever you may like in your own app. > btw, jquery 1.12.2 afaik is not vulnerable, just "old". > > On Monday, December 12, 2016 at 7:53:29 PM UTC+1, Jacinto Parga wrote: >> >> >> Hi,

[web2py] Re: sqlite3.OperationalError: no such table:

2017-02-14 Thread Edwin Haver
Hi Terrence, I have tried it your way now and for me a record is inserted. See results below. C:\Users\edwinh\Documents\web2py\gluon\packages\dal>python -i Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for