Re: [web2py] Re: OFF Topic -RiotJS

2015-06-12 Thread António Ramos
And Components.. 2015-06-12 10:03 GMT+01:00 António Ramos ramstei...@gmail.com: Also you can add https://github.com/vuejs/vue-resource https://github.com/ayamflow/vue-route Also vuejs has Directives, filters, transitions .. 2015-06-12 10:00 GMT+01:00 António Ramos ramstei...@gmail.com:

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-12 Thread Gergely Orosz
When I started to use web2py I loved the idea of the web IDE. As time passed by and I learned ins and outs of the framework and sublime text I started to use only Sublime. I searched the plugins I need to do everything from sublime while do my daily tasks (commit to git repository, resolve merge

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Niphlod
do option 1) , then option 2), then profile, then choose. Anything else is rubbish. -- 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

[web2py] recaptcha2 on pythonanywhere

2015-06-12 Thread webpypy
Hi, I am trying recaptcha2 on pythonanywhere, it is working, but no image , only verify check. using options = dict(theme='dark'), will switch to the dark theme. using options = dict(type='image'), is not showing any images, only the verify check. Can i know

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-12 Thread António Ramos
+1 2015-06-12 9:41 GMT+01:00 Gergely Orosz oroszgergely840...@gmail.com: When I started to use web2py I loved the idea of the web IDE. As time passed by and I learned ins and outs of the framework and sublime text I started to use only Sublime. I searched the plugins I need to do everything

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread 黄祥
profile is it same like https://docs.python.org/2/library/profile.html or web2py profile i've test something like python web2py.py --profiler=C:\profiler but the result i got in the profiler folder is *.prof file, when i open it, it seems to semi human readable file. don't know how to do with

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-12 Thread António Ramos
Also you can add https://github.com/vuejs/vue-resource https://github.com/ayamflow/vue-route Also vuejs has Directives, filters, transitions .. 2015-06-12 10:00 GMT+01:00 António Ramos ramstei...@gmail.com: In VueJS!!wait-for An event name to wait for on the incoming child component before

[web2py] Re: nginx, uwsgi, profiler

2015-06-12 Thread Niphlod
from what I remember runsnakerun has the entire call stack. It's not hard to identify where is the bottleneck. BTW: a read() such as in socket.read() is hardly something that needs fixing. On Friday, June 12, 2015 at 7:11:44 AM UTC+2, mweissen wrote: A second question: I have found that a

[web2py] web2py.com looks kind of crappy

2015-06-12 Thread Richard Penman
I get the impression web2py.com is not maintained these days - I see an award from 2012, a broken button (This button could not be generated. Help https://www.coinbase.com/external_redirect?link=https%3A%2F%2Fsupport.coinbase.comsignature=2b3e71a85b300325118665602b21e9470c9ce414), and looks

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-12 Thread António Ramos
In VueJS!!wait-for An event name to wait for on the incoming child component before switching it with the current component. This allows you to wait for asynchronous data to be loaded before triggering the transition to avoid unwanted flash of emptiness in between. Example: 1 div

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-12 Thread Michele Comitini
IMHO ractive.js does not depend on jquery... I just created the following and it does not require jQuery: https://github.com/michele-comitini/ractive_chart http://svg.soon.it/ractive-chart/html/example.html 2015-06-12 11:07 GMT+02:00 António Ramos ramstei...@gmail.com: And Components..

Re: [web2py] form.add_button() looks different than the Submit button displayed with SQLFORM

2015-06-12 Thread Selman Kocael
I didn't test, but you can try this. form.add_button('Reset',URL('visitorInfoForm'),_class=btn btn-primary) 2015-06-12 2:55 GMT+03:00 Msak meenoo3...@gmail.com: I am using SQLFORM to generate and display form from the database table. I am adding a Reset button next to default Submit button

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Niphlod
profile in your case is simply a matter on how much time it takes. On Friday, June 12, 2015 at 8:59:53 AM UTC+2, 黄祥 wrote: profile is it same like https://docs.python.org/2/library/profile.html or web2py profile i've test something like python web2py.py --profiler=C:\profiler but the

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread Anthony
On Friday, June 12, 2015 at 8:36:43 AM UTC-4, zimani wrote: I have this code: def author(id): if id is None: return Unknown else: user = db.auth_user(id) me=db(db.auth_user.id == id).select(db.auth_user.usealiasname).first().usealiasname if

Re: [web2py] form.add_button() looks different than the Submit button displayed with SQLFORM

2015-06-12 Thread Anthony
Yes, .add_button() does take a _class argument, which you will need to specify to match the class being used for your formstyle. Anthony On Friday, June 12, 2015 at 2:03:15 AM UTC-4, xmarx wrote: I didn't test, but you can try this. form.add_button('Reset',URL('visitorInfoForm'),_class=btn

[web2py] Find name of user with a given id: Auth table issues

2015-06-12 Thread zimani
I have this code: def author(id): if id is None: return Unknown else: user = db.auth_user(id) me=db(db.auth_user.id == id).select(db.auth_user.usealiasname).first().usealiasname if me==False: return '%(first_name)s %(last_name)s' % user if user

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread zimani
I apologise, i have been trying too many things: me=db(db.auth_user.id == id).select(db.auth_user.usealiasname).first().usealiasname This is what i currently have. On Friday, 12 June 2015 14:54:57 UTC+2, Anthony wrote: On Friday, June 12, 2015 at 8:36:43 AM UTC-4, zimani wrote: I have

[web2py] Re: Scheduler Question

2015-06-12 Thread Niphlod
inspect the log to see why another worker gets started. Each worker started can result AT MOST as two processes, the worker itself and the process that actually executes the task. On Friday, June 12, 2015 at 10:36:35 PM UTC+2, Michael Gheith wrote: I have an application that uses the

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
it's just a matter of ordering by the parent and then the child. Once you get a resultset similar to parent.id | parent.style | child.id | child.name 1 yellow 4 foo1 1 yellow 5 bar1 1 yellow 6 baz1 2

[web2py] Re: Scheduler Question

2015-06-12 Thread 'Michael Gheith' via web2py-users
Hmmm. Looking in the database, I have 21 TIMEOUTS which corresponds to the 21 workers with all the same process ID of 10978... a red herring? $ pstree -p 10978 python(10978)─┬─python(1719) ├─python(2063) ├─python(2977) ├─python(5383)

[web2py] Scheduler Question

2015-06-12 Thread 'Michael Gheith' via web2py-users
I have an application that uses the scheduler. It runs really good, however I noticed odd behavior which I don't think is normal. When I launch a worker thread (just one) with the following everything works great: python web2py.py -K myapp A few days later I will come back to the node that

[web2py] Re: web2py permissions

2015-06-12 Thread Niphlod
summarizing, web2py is just an executable. It protects you by default from directory traversal attacks. Everything but static folder is dinamically created by the executable. You may want to serve static with your webserver of choice to relieve the burden off of web2py shoulders, but ultimately

[web2py] Re: web2py permissions

2015-06-12 Thread Lewis
I know this is REALLY old but this topic is crucial to production and gets VERY little attention. So, it seems that the lock script has to run AFTER the web2py server has been started by www-data (as a daemon by UWSGI, for example). Or, can root start everything even in its locked state? I

[web2py] Re: requires=IS_DATE() leads to type 'exceptions.AttributeError'('str' object has no attribute 'year')

2015-06-12 Thread xgp . latino
Nevermind, I have to manually change field type to DATE due to not autocasting content of the field of web2py. Cheers, El viernes, 12 de junio de 2015, 15:11:34 (UTC-5), xgp.l...@gmail.com escribió: I know this is way too old but is happening to me. After Massimo suggestion changes i

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Alex Glaros
are there file size limitations when moving to dict that are not an issue if python loop? -- 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

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Alex Glaros
I get the ordering but parent appears redundantly. Do I iterate through loop checking for change in parent.id so parent only gets displayed first time? if parent.id != previous_parent_id display this specific parent.id one time only previous_parent_id = parent.id ## am resetting the

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Dave S
On Friday, June 12, 2015 at 2:12:51 PM UTC-7, Alex Glaros wrote: I get the ordering but parent appears redundantly. Do I iterate through loop checking for change in parent.id so parent only gets displayed first time? if parent.id != previous_parent_id display this specific

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Dave S
On Thursday, June 11, 2015 at 11:59:53 PM UTC-7, 黄祥 wrote: profile is it same like https://docs.python.org/2/library/profile.html or web2py profile i've test something like python web2py.py --profiler=C:\profiler but the result i got in the profiler folder is *.prof file, when i open

[web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1145: ordinal not in range(128)

2015-06-12 Thread Antonio Salazar
I have the same problem. PostgreSQL database, web2py 2.11.2-stable+timestamp.2015.05.30.16.33.24 source install. Now any field update which has non-ASCII characters fails with type 'exceptions.UnicodeDecodeError' 'ascii' codec can't decode byte 0xc3 in position X: ordinal not in range(128) By

[web2py] Re: language detecting

2015-06-12 Thread Niphlod
weirdest requirement ever but not hard if T.accepted_language in ('ru-RU', ): raise HTTP(404) On Friday, June 12, 2015 at 7:31:41 PM UTC+2, lucas wrote: hey everyone, via google analytics, i am getting an inordinate amount of traffic from russia. my site would not be of

[web2py] Re: unicode error with postgre on 2.10.3 (with sample app)

2015-06-12 Thread Antonio Salazar
I'm seeing this bug with PostgreSQL 9.3 and web2py 2.11.2-stable+timestamp.2015.05.30.16.33.24, both running on Windows 7 64 bit. Updating a users's name to include non-ASCII characters using Database Administration yields: type 'exceptions.UnicodeDecodeError' 'ascii' codec can't decode byte

[web2py] Re: Easy way to make a functional table / grid / spreadsheet

2015-06-12 Thread Dave S
On Friday, June 12, 2015 at 8:51:53 AM UTC-7, Martti Lamberg wrote: Hi! If this isn't a good place to ask, can someone please forward me to a better web2py forum. I have a question. Is there an easy way to make a functional table / grid / spreadsheet (or whatever the word is in

[web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
is it better to issue two separate queries returning a set with 2 records and 10 respectively or to fetch a joined set (and massage it later on) that extracts 20 records ? There's no answer to that except that the two possibilities are entirely doable. Cardinality of the sets comes into play,

[web2py] Re: requires=IS_DATE() leads to type 'exceptions.AttributeError'('str' object has no attribute 'year')

2015-06-12 Thread xgp . latino
I know this is way too old but is happening to me. After Massimo suggestion changes i get: class 'gluon.contrib.pg8000.ProgrammingError' ('ERROR', '42804', 'column fechaingreso__tmp is of type date but expression is of type character varying') Any ideas. Regards, El miércoles, 9 de octubre

[web2py] Re: language detecting

2015-06-12 Thread lucas
true, it is a weird request. but maybe so is the russians hacking away. thanx for the help, i'll drop a message in a few days if i see the analytics from russia go to zero, that would be nice. thanx again, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Alex Glaros
did you mean I only need the second query? I know it already extracts data that query one has, but I didn't know how to iterate using only the second one and not redundantly display the parent values. On Fri, Jun 12, 2015 at 12:06 PM, Niphlod niph...@gmail.com wrote: is it better to issue two

Re: [web2py] Re: avoid separate query within second nested loop

2015-06-12 Thread Niphlod
so you have a problem with python, not the database! if you're not loop-proficient, massage it first to a dictionary, then loop over it from collections import defaultdict resultset = defaultdict(list) for row in parents_and_childs: resultset[row.parent_record.id].append(row) then you can

[web2py] blob type crop data

2015-06-12 Thread Viktor Boiarchuk
Hello everybody! Nice to meet so excellent community. My problem is next. I'm trying to use web2py with *external* sqlite database formed by another program. One of the column of those database consists of binary data of pdf docs. So I defined that field in model *Field('pdf_binary','blob')*.

[web2py] Re: sqlform.grid maxtextlengths shoots blanks

2015-06-12 Thread jackson . read
That dee On Friday, June 12, 2015 at 12:27:27 AM UTC-4, jackso...@quantachrome.com wrote: I get the same truncated display for the log message text no matter what I set maxtextlengths...This app is rock+1 on the IQ simplicity scale and yet it does not work...BTW: I removed all layouts

[web2py] Re: Easy way to make a functional table / grid / spreadsheet

2015-06-12 Thread Massimo Di Pierro
Look into this: http://www.web2py.com/examples/spreadsheet/index https://vimeo.com/5432441 and this http://handsontable.com/ It would be a nice project to marge the two into one web2py app. On Friday, 12 June 2015 10:51:53 UTC-5, Martti Lamberg wrote: Hi! If this isn't a good place to ask,

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread 黄祥
any idea how to generate the profile with cprofile on a web2py app that supports database access? i've tried but it return an error C:\Users\sugizopython -m cProfile -o c:\profiler\profile.profile C:\web2py\applications\test\controllers\transaction.py Traceback (most recent call last): File

[web2py] Re: unicode error with postgre on 2.10.3 (with sample app)

2015-06-12 Thread Massimo Di Pierro
As stated in the previous thread. This is a bug in pg8000 (the default driver we ship with web2py). You need to install psycopg2. On Friday, 12 June 2015 13:59:28 UTC-5, Antonio Salazar wrote: I'm seeing this bug with PostgreSQL 9.3 and web2py 2.11.2-stable+timestamp.2015.05.30.16.33.24,

[web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1145: ordinal not in range(128)

2015-06-12 Thread Massimo Di Pierro
It is a bug in pg8000. You need to install psycopg2 On Friday, 12 June 2015 13:51:55 UTC-5, Antonio Salazar wrote: I have the same problem. PostgreSQL database, web2py 2.11.2-stable+timestamp.2015.05.30.16.33.24 source install. Now any field update which has non-ASCII characters fails

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread Dave S
On Friday, June 12, 2015 at 5:08:36 PM UTC-7, 黄祥 wrote: i've tried but none is shown when using runsnake and the error traceback occured when using cprofilev. any idea? step i took on win 7 ultimate 64 with python 2.7.8 : pip install cprofilev easy_install SquareMap RunSnakeRun python

[web2py] Re: using database record or database query in terms of performance

2015-06-12 Thread 黄祥
i've tried but none is shown when using runsnake and the error traceback occured when using cprofilev. any idea? step i took on win 7 ultimate 64 with python 2.7.8 : pip install cprofilev easy_install SquareMap RunSnakeRun python C:\web2py\web2py.py -F C:\profiler C:\Users\sugizorunsnake

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread zimani
Its supposed to be the same. But this does not work. All i am doing is checking if this user: db.auth_user(id) wants to use an aliasname or not. Of which aliasname is a field in auth_user table On Friday, 12 June 2015 15:11:19 UTC+2, zimani wrote: I apologise, i have been trying too many

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-12 Thread António Ramos
My list of missing Web2py IDE features http://code.tutsplus.com/articles/perfect-workflow-in-sublime-text-free-course--net-27293 2015-06-12 16:50 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: I do not use sublime but could you list a list of features missing/problems with:

Re: [web2py] web2py.com looks kind of crappy

2015-06-12 Thread Manuele Pesenti
Il 12/06/15 11:04, Richard Penman ha scritto: I find myself insanely productive using web2py compared to Django and Rails, so would be great if the homepage was more polished and could serve to attract developers to try it out. I don't think we need more users... I got more then 81000 unread

[web2py] Re: sqlform.grid maxtextlengths shoots blanks

2015-06-12 Thread Anthony
Which version of web2py? Also, have you set the represent attribute on the field in question? And just to be clear, is the problem that the actual text truncation isn't happening where you expect, or is it just that the physical width of the table column is smaller than you'd like? Maybe show

[web2py] avoid separate query within second nested loop

2015-06-12 Thread Alex Glaros
Want to avoid separate query within the second loop. Is this the right way? Build two sets from two separate joins, one for the parent record and one for the children. Then run the parent join for the parent loop and the child join in the 2nd, nested loop Parent_Data =

[web2py] Re: Easy way to make a functional table / grid / spreadsheet

2015-06-12 Thread Anthony
Can you provide more detail regarding the workflow? Do you need updates going only from the browser to the server without page reloads, or does the server need to push realtime updates to the browser as well? Are there multiple players playing the same game simultaneously (so, if one player

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-12 Thread António Ramos
Ok.just some some... Em 12/06/2015 17:27, António Ramos ramstei...@gmail.com escreveu: My list of missing Web2py IDE features http://code.tutsplus.com/articles/perfect-workflow-in-sublime-text-free-course--net-27293 2015-06-12 16:50 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com:

[web2py] Re: sqlform.grid maxtextlengths shoots blanks

2015-06-12 Thread Massimo Di Pierro
Can you help us debug? What if you use grid(., maxtextlength=80) On Thursday, 11 June 2015 23:27:27 UTC-5, jackson.r...@quantachrome.com wrote: I get the same truncated display for the log message text no matter what I set maxtextlengths...This app is rock+1 on the IQ simplicity scale

[web2py] Re: web2py.com looks kind of crappy

2015-06-12 Thread Massimo Di Pierro
It is maintained. The award is from 2012 but we are still proud of it. Thank for reporting the problem with the donation link. I will remove it until it is resolved. Anyway, I have suggested before. I think we need to revamp that web site. On Friday, 12 June 2015 04:04:14 UTC-5, Richard

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-12 Thread Massimo Di Pierro
I do not use sublime but could you list a list of features missing/problems with: https://bitbucket.org/kfog/w2p that would help us improve it. On Friday, 12 June 2015 03:41:49 UTC-5, Gergely Orosz wrote: When I started to use web2py I loved the idea of the web IDE. As time passed by and I

[web2py] Web2py SQLFORM.grid maxtextlengths etc

2015-06-12 Thread jackson . read
I can only get my grid field the width the width I want them in a SQLFORM.grid by padding the headers w/non blank chars. I have tried using maxtextlengths dictionary maxtextlength to set all. Neither seems to have any effect. I also removed my layout but the fields widths stayed the same.

[web2py] Re: recaptcha2 on pythonanywhere

2015-06-12 Thread Massimo Di Pierro
The problem may be that free pythonanywhere accounts do not enable outside http connections. Recaptcha uses urllib2 On Friday, 12 June 2015 03:19:36 UTC-5, webpypy wrote: Hi, I am trying recaptcha2 on pythonanywhere, it is working, but no image , only verify check. using options =

[web2py] Easy way to make a functional table / grid / spreadsheet

2015-06-12 Thread Martti Lamberg
Hi! If this isn't a good place to ask, can someone please forward me to a better web2py forum. I have a question. Is there an easy way to make a functional table / grid / spreadsheet (or whatever the word is in English, I'm not referring to database table, or a desk)? I want a sort of a map

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread Anthony
If you have: user = db.auth_user(id) Then there is no need for the me variable -- just use user.usealiasname. However, if id is the same as auth.user_id, then you don't even need the above line -- just use auth.user (which holds the whole user record). If it still isn't working, then there is

[web2py] language detecting

2015-06-12 Thread lucas
hey everyone, via google analytics, i am getting an inordinate amount of traffic from russia. my site would not be of interest to russians. i have a list of IPs and net masks for dropping that traffic using iptables but for some reason i am still getting some russian traffic. how can i also

[web2py] Re: nginx, uwsgi, profiler

2015-06-12 Thread Dave S
On Thursday, June 11, 2015 at 11:29:01 PM UTC-7, Niphlod wrote: from what I remember runsnakerun has the entire call stack. It's not hard to identify where is the bottleneck. The cprofilev tool in the OP also allows drilling down; the default view shows all levels, but by clicking on