[web2py] GAE problems

2016-03-29 Thread rif
The gae query is this: http://11.firmoasa.appspot.com/facturi I have this route: routers = dict( # base router BASE=dict( default_application='firmoasa', ), ) And the full log is this: /facturi 500 952ms 0kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like G

Re: [web2py] Re: web2py 2.14.2

2016-03-29 Thread Sukrut Joshi
please help for regex of mobile numbers of india i dont want use country code ..number must start with digit and end with digit and length of mobile no=10 requires = IS_MATCH('^1?((-)\d{3}-?|\(\d{3}\))\d{3}-?\d{4}$', error_message='not a phone number') this is for us..and need for indi

[web2py] Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
view: {{extend 'layout.html'}} {{for row in rows:}} {{=row.name}} check 'about' {{pass}} in controller: def index(): rows=db(db.groups.id>0).select() return locals() def about_group(): row=db(db.groups.id==request.vars.row.id).select().first() return row.about --

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Leonel Câmara
It shouldn't be on href it should be on onclick. Consider using a trapped link for that instead. http://web2py.com/books/default/chapter/29/12/components-and-plugins#Trapped-Ajax-links-and-the-A-Helper -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
{{extend 'layout.html'}} {{for row in rows:}} {{=row.name}} check 'about' {{pass}} def index(): rows=db(db.groups.id>0).select() return locals() def about_group(): row=db(db.groups.id

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Kiran Subbaraman
Escaping the inner-quotes: onclick="ajax('{{=URL(\'default\',\'about_group\')}}',[row.id ],'target');"> Also will be a good idea to see what sort of errors appear on your browser's console, and if the generated page contains the callback url that you expect. ___

[web2py] Re: How to modify a scheduled task?

2016-03-29 Thread Niphlod
same warning applies. in that case, I think the culprit is that next_run_time needs to be updated too. On Monday, March 28, 2016 at 9:47:19 PM UTC+2, Dave S wrote: > > > > On Monday, March 28, 2016 at 12:38:03 PM UTC-7, Niphlod wrote: >> >> The specific issue with this case is that the scheduler

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
now it says: unexpected character after line continuation character (default/index.html, line 83) earlier it was giving no response on clicking as i expected it to work as per its onclick function. On Tuesday, March 29, 2016 at 4:10:02 PM UTC+5:30, Kiran Subbaraman wrote: > > Escaping the inne

[web2py] Re: Progress bars and session

2016-03-29 Thread chenlevy
So, I spend the best part of the day playing with your example but wasn't able to make it work. The best I have is that I see that before the form is submitted *getprogress* is called and return the expected value, but while progress is running it blocks the invocation of *getprogress* and the

Re: [web2py] Re: Trying to reach a routes behavior

2016-03-29 Thread Carlos Cesar Caballero Díaz
Hi Anthony and Richard, these are the functions of my country controller (state and city controllers are similar): def index() def edit() In the future the controller will have more functions (we have planned new features that will be built as components) There is no a cuba() function, in in

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Niphlod
a taddle bit of recap, seems that you're loosing the bigger picture ANYTHING (or, the 99%) of things in views contained in a {{=blabla}} are properly escaped. Back to the "problem": - first of all, you shouldn't generate multiple times. Every element with an id attribute should be the onl

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Anthony
On Tuesday, March 29, 2016 at 6:09:57 AM UTC-4, Jacob Devin wrote: > > view: > > {{extend 'layout.html'}} > {{for row in rows:}} > > {{=row.name}} > > > check > 'about' > Please review the documentation. The second argument to the ajax() function is a list of "name" attributes of form

Re: [web2py] Re: Trying to reach a routes behavior

2016-03-29 Thread Anthony
> > Right now the url to reach the index function of the country controller is > something like www.myapp.com/country/cuba because index is set as the > default function using the parametric router ( > www.myapp.com/country/index/cuba without set index() as default). > > Now I need to find a wa

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
Thank you Anthony. It worked flawlessly! On Tuesday, March 29, 2016 at 6:50:24 PM UTC+5:30, Anthony wrote: > > On Tuesday, March 29, 2016 at 6:09:57 AM UTC-4, Jacob Devin wrote: >> >> view: >> >> {{extend 'layout.html'}} >> {{for row in rows:}} >> >> {{=row.name}} >> >> >> check >> 'ab

Re: [web2py] Re: Trying to reach a routes behavior

2016-03-29 Thread Richard Vézina
I agree with Anthony... Do you have any constraint that prevent you from doing that... I would definetly stay away from router as much as I can... Richard On Tue, Mar 29, 2016 at 9:37 AM, Anthony wrote: > Right now the url to reach the index function of the country controller is >> something li

Re: [web2py] Re: Trying to reach a routes behavior

2016-03-29 Thread Carlos Cesar Caballero Díaz
Many thanks Anthony and Richard, I'll use your suggestion. Greetings. El 29/03/16 a las 10:27, Richard Vézina escribió: I agree with Anthony... Do you have any constraint that prevent you from doing that... I would definetly stay away from router as much as I can... Richard On Tue, Mar 29,

Re: [web2py] Re: web2py 2.14.2

2016-03-29 Thread Richard Vézina
Or second answer here : http://stackoverflow.com/questions/3813195/regular-expression-for-indian-mobile-numbers On Tue, Mar 29, 2016 at 11:24 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > @Sukrut > Maybe here : > http://stackoverflow.com/questions/18351553/regular-expression-validati

Re: [web2py] Re: web2py 2.14.2

2016-03-29 Thread Richard Vézina
@Sukrut Maybe here : http://stackoverflow.com/questions/18351553/regular-expression-validation-for-indian-phone-number-and-mobile-number On Tue, Mar 29, 2016 at 4:07 AM, Sukrut Joshi wrote: > please help for regex of mobile numbers of india i dont want use country > code ..number must start with

Re: [web2py] Re: Google App Engine Launcher 1.9.34 breaks web2py?

2016-03-29 Thread Richard Vézina
Git 2.8 will solve that... On Tue, Mar 29, 2016 at 1:53 AM, Tommi Lahtonen wrote: > > > On Thursday, March 24, 2016 at 1:41:42 AM UTC+2, Massimo Di Pierro wrote: >> >> Which version of web2py? Did you use git clone? Did you do what it is >> asking? >> >> git submodule update --init --recursive >

[web2py] I want to make a query this way but unfortunately this ain't working. How to fix?

2016-03-29 Thread Jacob Devin
rows=db((db.info.last_name.lower().find(request.args(0).lower())) | (db.info.first_name.lower().find(request.args(0).lower(.select() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Why do I get a never ending 'working' on trying to update my pic in the form in default/screen.html

2016-03-29 Thread Emmanuel Dsouza
in model: db.define_table('info', Field('info_id', default=auth.user_id, writable=False, readable=False), Field('dp','upload',label='Update your profile pic'), Field('first_name',requires=IS_NOT_EMPTY(error_message="Please fill it")),

[web2py] Re: Date picker format

2016-03-29 Thread Jeff Riley
Mr. Pierro. I am embarrassed that was so easy. On Monday, March 28, 2016 at 11:09:32 PM UTC-5, Massimo Di Pierro wrote: > > look into views/web2py_ajax.html > > On Monday, 28 March 2016 16:09:39 UTC-5, Jeff Riley wrote: >> >> Hello everyone. I have the following field defined. >> >> Field('due_d

[web2py] Rawsql to DAL Rows

2016-03-29 Thread Alfonso Serra
Im trying to adapt an executesql query to a dal object to make use of features like export to csv. So ive tried something like: #create a dummy table with the same structure as the results db.define_table("results", Field("field1", "string") , Field("field2", "string") , migrate = Fal

[web2py] I want to make a query this way but unfortunately this ain't working. How to fix?

2016-03-29 Thread Anthony
Did you read the documentation? What are you trying to do? -- 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 subsc

[web2py] setup-web2py-nginx-uwsgi-ubuntu.sh

2016-03-29 Thread Richard
Hello, I was happy when I try setup-web2py-nginx-uwsgi-ubuntu.sh with Ubuntu 16.04 beta 2... It worked flawlessly, thanks... Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/iss

[web2py] Re: Why do I get a never ending 'working' on trying to update my pic in the form in default/screen.html

2016-03-29 Thread Leonel Câmara
You're trying to upload an image using ajax which is a little bit more complicated and requires you to use something to help you like jquery.form.js otherwise it won't work. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] bug? menu v2.14.3

2016-03-29 Thread lucas
hello one and all, so i upgraded from v2.12.3 to v2.14.3. i had trouble with the menu going deeper then the level past the first drop down. so i started a new app and only added the bold below under menu.py: response.menu += [ (T('My Sites'), False, URL('admin', 'default', 'site'))

[web2py] Re: I want to make a query this way but unfortunately this ain't working. How to fix?

2016-03-29 Thread Jacob Devin
I want to make a 'search'. For example if I search Jack, it should return all those people's datas from the db which have either first_name or last_name with substring 'jack'. What's wrong here? On Tuesday, March 29, 2016 at 11:36:18 PM UTC+5:30, Anthony wrote: > > Did you read the documentation?

[web2py] Re: Why do I get a never ending 'working' on trying to update my pic in the form in default/screen.html

2016-03-29 Thread Emmanuel Dsouza
So any another idea, how to do it? On Wednesday, March 30, 2016 at 1:16:43 AM UTC+5:30, Leonel Câmara wrote: > > You're trying to upload an image using ajax which is a little bit more > complicated and requires you to use something to help you like > jquery.form.js otherwise it won't work. > --

[web2py] Re: How did you implement chat system in your app? How's my idea?

2016-03-29 Thread Emmanuel Dsouza
any other idea besides websocket? On Tuesday, March 29, 2016 at 12:07:00 AM UTC+5:30, Ron Chatterjee wrote: > > > https://www.toptal.com/tornado/simple-python-websocket-server?utm_campaign=blog_post_simple_python_websocket_server&utm_medium=email&utm_source=blog_subscribers > > Interesting article

Re: [web2py] Re: alternate date/time widgets?

2016-03-29 Thread Massimo Di Pierro
You do not have to use stupid css to use the tags widget. But you will need to write some CSS to make it look the way you want. On Monday, 28 March 2016 23:52:38 UTC-5, Ron Chatterjee wrote: > > If we dont use stupid css wondering what will b the equivalent > autocomplete with dismissal tags can

[web2py] Re: GAE problems

2016-03-29 Thread Massimo Di Pierro
I cannot tell what the query is. On Tuesday, 29 March 2016 02:06:43 UTC-5, rif wrote: > > The gae query is this: http://11.firmoasa.appspot.com/facturi > > I have this route: > routers = dict( > > # base router > BASE=dict( > default_application='firmoasa', > ), > ) > > And th

[web2py] Re: Date picker format

2016-03-29 Thread Massimo Di Pierro
LOL. I think it is not easy enough in fact. In web3py I think all date conversions should be done client side and not in validator. There is no reason for the server to even know what the client representation of dates is. On Tuesday, 29 March 2016 12:44:54 UTC-5, Jeff Riley wrote: > > Mr. Pier

[web2py] Upload file from 'static/images' to database

2016-03-29 Thread Nick Michael
Hi, I'm having some trouble and was hoping someone could point me in the right direction. I'm creating an application which has an input form which stores to a database. One entry accepts images, but can also be left empty (by using requires IS_EMPTY_OR). I also have a placeholder image saved u

[web2py] IS_NOT_IN_DB validation different than IS_IN_DB

2016-03-29 Thread Norm Rajala
Just started with web2py... great framework. I tried and failed however to find an answer to why two validators seem to validate differently in terms of checking the syntax of parameters. I do the following: tableNames = ['taxaTS', 'taxaPF'] for tableName in tableNames: # Create the taxa t

[web2py] float argument required, not str

2016-03-29 Thread Ciro Alves
Salve Pessoal Estou com um erro que não consigo resolver. Eu faço um select onde só estão envolvidas variáveis inteiras mas, mesmo assim, recebo o erro acima dizendo que uma variável float era requerida. Segue abaixo a descrição do erro. Não consigo passar do select. E o estranho é que sempre

[web2py] Using DAL

2016-03-29 Thread Aman Bindal
Hi, I need to access web2py sqlite database from python. So, I wrote a python code like this >> from pydal import DAL, Field >> db = DAL('sqlite://storage.sqlite') >> print db.tables [] >> db.define_table(... Already existing table,) it is showing an error of sqlite3.OperationalError: ta

[web2py] Re: Rawsql to DAL Rows

2016-03-29 Thread Alfonso Serra
Ive found a Niplhod's answer that solves this. 1.-Create a dummy table: #create a dummy table with the same structure as the results db.define_table("results", Field("field1", "string") , Field("field2", "string") , migrate = False ) 2.- Execute any custom sql with that structure: rows

[web2py] Re: I want to make a query this way but unfortunately this ain't working. How to fix?

2016-03-29 Thread Anthony
On Tuesday, March 29, 2016 at 4:43:20 PM UTC-4, Jacob Devin wrote: > > I want to make a 'search'. For example if I search Jack, it should return > all those people's datas from the db which have either first_name or > last_name with substring 'jack'. What's wrong here? > What's wrong is that you

[web2py] Re: IS_NOT_IN_DB validation different than IS_IN_DB

2016-03-29 Thread Anthony
tablename is a variable, but you are using it in a string literal (i.e., '[tablename].name') and expecting Python to still somehow figure out you are referring to a variable. You should instead use db[tablename].name there. Anthony On Tuesday, March 29, 2016 at 5:28:11 PM UTC-4, Norm Rajala wr

[web2py] Re: Using DAL

2016-03-29 Thread Leonel Câmara
Add a migrate=False db = DAL('sqlite://storage.sqlite', migrate=False) -- 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

[web2py] Re: Using DAL

2016-03-29 Thread Anthony
If all the tables you define in the shell will be pre-existing, use DAL(..., migrate_enabled=False), which will prevent all migrations. If you only need to prevent migrations on a per table basis, then do db.define_table(..., migrate=False). Anthony On Tuesday, March 29, 2016 at 5:28:14 PM UTC

[web2py] Re: Using DAL

2016-03-29 Thread Anthony
Or as Leonel, suggests, DAL(..., migrate=False), which simply sets the default value of the "migrate" argument to db.define_table to False (rather than completely disabling all migrations). In that case, you can simply override that default when needed via db.define_table(..., migrate=True). An

[web2py] Re: GAE problems

2016-03-29 Thread rif
Oh, you mean the db query... Here is the whole controller that's generating the error: def index(): page = int(request.vars['page']) if request.vars['page'] else 0 items_per_page = 10 limitby = (page*items_per_page,(page+1)*items_per_page+1) form = crud.update(Facturi, a0, next=UR

[web2py] Re: float argument required, not str

2016-03-29 Thread Dave S
On Tuesday, March 29, 2016 at 2:28:11 PM UTC-7, Ciro Alves wrote: > > Salve Pessoal > > Estou com um erro que não consigo resolver. Eu faço um select onde só > estão envolvidas variáveis inteiras mas, mesmo assim, recebo o erro acima > dizendo que uma variável float era requerida. > > Segue aba

[web2py] Re: Upload file from 'static/images' to database

2016-03-29 Thread Dave S
On Tuesday, March 29, 2016 at 2:28:13 PM UTC-7, Nick Michael wrote: > > Hi, I'm having some trouble and was hoping someone could point me in the > right direction. > > I'm creating an application which has an input form which stores to a > database. One entry accepts images, but can also be lef

[web2py] Re: float argument required, not str

2016-03-29 Thread Leonel Câmara
O erro parece ser que uma dessas tabelas tem lá 'decimal' como tipo mas o valor que está na base de dados é uma string. Fizeste alguma mudança às tabelas e uma migração recentemente? Já agora, se possível, fala inglês que este grupo é internacional. -- Resources: - http://web2py.com - http://w

Re: [web2py] Re: alternate date/time widgets?

2016-03-29 Thread ..mg..
Is there an easy way to get just the widgets? I have stupid.css, and I should have some time Thursday to play with it. -mg On Tue, Mar 29, 2016 at 02:25:11PM -0700, Massimo Di Pierro wrote: > You do not have to use stupid css to use the tags widget. But you will need > to write some CSS to mak

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-03-29 Thread João Saraiva
Hi! I noticed that DefineScope appears twice in the list (although the URLs are different: one points to the main page, while the other points to the page where web2py is mentioned). I think it is the only duplicate in the list, although I might have missed something. Cheers, João Saraiva On