[web2py] Re: transfer local database to Google App Engine website

2013-10-27 Thread Niphlod
any migration mentioned in the book refers to altering the table on the backend (i.e. adding/removing columns, tables, and so on). You instead want to move the data within the local database to what is in appspot.com you need to do that AFTER you moved the application directly on .appspot.c

[web2py] Re: sqlform.smartgrid not show linked_tables only the archieves

2013-10-27 Thread 黄祥
please ignore this report, i'm sorry, my mistake in my previous version, the same apps, i didn't use response.models_to_run, in current stable version i use response.models_to_run and forgot to add the related linked_tables. best regards, stifan -- Resources: - http://web2py.com - http://web2

[web2py] Named arguments in URL()

2013-10-27 Thread Roland Kainrath
Hi All, I have a question about URL(). In the book it was written: "... It is also possible to specify application, controller and function using named argument. URL(a='a', c='c', f='f') ..." but for example when I write this: URL(a='myotherapp') the generated URL comes like this: http://127.0

[web2py] Conexao POSTGRESQL com PYTHON/WEB2PY - problema

2013-10-27 Thread Jose Carlos Vicente Pereira
Ola, bom dia.. estou com um problema, nao consigo conectar meu banco de dados postgresql ao meu projeto, iniciei utilizando o SQLLITE, conforme aprendi no curso do bruno rocha, so q agora ja queria utilizar o postgresql, dai veio os problemas... rs veja meu codigo... ---

[web2py] Re: Named arguments in URL()

2013-10-27 Thread Anthony
Perhaps the book should be clarified -- if you use named arguments, you have to specify all three. If you specify only 1 argument, it assumes it should be the function, and if you specify 2, it assumes it should be the controller and function. Anthony On Sunday, October 27, 2013 6:17:26 AM UTC

[web2py] SQLFORM onvalidation not working

2013-10-27 Thread Remco K
Hi all, I have a SQLFORM with an onvalidation on the form.accepts(), but it's not working. It skips the onvalidation function... Here is what i try (or just like it): def my_form_processing(form): c = form.vars.a * form.vars.b if c < 0: form.errors.b = 'a*b cannot be negative'

[web2py] Re: SQLFORM onvalidation not working

2013-10-27 Thread Anthony
How are you determining whether my_form_processing is getting called? On Sunday, October 27, 2013 10:05:17 AM UTC-4, Remco K wrote: > > Hi all, > > I have a SQLFORM with an onvalidation on the form.accepts(), but it's not > working. It skips the onvalidation function... > > Here is what i try (or

[web2py] Re: SQLFORM onvalidation not working

2013-10-27 Thread Remco K
Hi Anthony, By setting a breakpoint for the debugger and work with print "bla" :) -- 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 m

[web2py] Re: Error during populating dummy data

2013-10-27 Thread Massimo Di Pierro
Unfortunately populate has a vocabulary that includes words longer the 16bytes. On Sunday, 27 October 2013 00:47:40 UTC-5, tomasz bandura wrote: > > Hello, > > I noticed an error when I try to populate dummy data (i.e. > populate(db.mytable,100)): > > My table : > > db.define_table('parameters_

[web2py] Conexao POSTGRESQL vs PYTHON/WEB2PY - problemas

2013-10-27 Thread Jose Carlos Vicente Pereira
Ola, bom dia... estou tentando conectar meu banco postgresql ao meu projeto, so q nao consigo.. veja meu codigo detalhado abaixo... *no MODELS - "appsettin

[web2py] Re: NDB support for GAE

2013-10-27 Thread Saisha D
Hi, Just curious, what's the status of this patch? I'm eagerly waiting for NDB support in web2py. S On Sunday, September 29, 2013 9:49:36 AM UTC-7, Quint wrote: > > Hi, > > I think web2py should support NDB for the Google Datastore. > NDB a newer datastore api which has automatic caching features

Re: [web2py] Named arguments in URL()

2013-10-27 Thread Jonathan Lundell
On 27 Oct 2013, at 6:48 AM, Anthony wrote: > Perhaps the book should be clarified -- if you use named arguments, you have > to specify all three. If you specify only 1 argument, it assumes it should be > the function, and if you specify 2, it assumes it should be the controller > and function

[web2py] Re: NDB support for GAE

2013-10-27 Thread Saisha D
btw dumb question when db.py says DAL(google:datastore) Is it referring to the DB datastore in GAE https://developers.google.com/appengine/docs/python/datastore/ Asking because there a few options for storage mentioned in the GAE docs. On Sunday, September 29, 2013 9:49:36 AM UTC-7, Quint wrote:

[web2py] Re: SQLFORM onvalidation not working

2013-10-27 Thread Remco K
I've found that it's probably not a bug in Web2py. Problem is that i use a datetime picker in my view, and the format of it is not valid a datetime format for Web2py to store it in the DB. So Web2y send from the db.py a message '' enter date and time as 1963-08-28 14:30:59". What is used to do

[web2py] Re: auth.messages.verify_email html template

2013-10-27 Thread Ykä Marjanen
I have replaced the standard verification with my own. The standard authentication is pretty simple as it creates a unique key, which it stores in the database and sends as a link to the registrant. When the link is clicked it will match the registration details with the unique id and stores (ac

[web2py] Getting the current record in a custom widget

2013-10-27 Thread mr.freeze
Hi folks. I have a custom widget that needs to do some advanced formatting based on other field values in the current record (i.e. in an edit form) but I don't see any way to get the current record in a custom widget. Any ideas? def my_custom_widget(field, value, **attrs): #how do I get the

Re: [web2py] Named arguments in URL()

2013-10-27 Thread Anthony
> [The fix I have in mind is to make the first three arguments of URL > something like (acf1, acf2, acf3, ...) and push (a,c,f) into **kwargs.] > Clever fix. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co

[web2py] Re: Getting the current record in a custom widget

2013-10-27 Thread Anthony
Neither the form nor the record gets passed to the widget. However, you could independently pull the record before adding the widget to the field: def myform(): record = db.mytable(request.args(0)) db.mytable.myfield.widget = lambda f, v, r=record: my_custom_widget(f, v , record=r) fo

[web2py] Re: Getting the current record in a custom widget

2013-10-27 Thread mr.freeze
Thanks, Anthony. I am doing something similar by setting a session variable so that it will work in appadmin forms too. I wonder why widgets don't get the record since the represent function does. Seems like an oversight. On Sunday, October 27, 2013 1:41:20 PM UTC-5, Anthony wrote: > > Neithe

Re: [web2py] Named arguments in URL()

2013-10-27 Thread Jonathan Lundell
On 27 Oct 2013, at 11:21 AM, Anthony wrote: > [The fix I have in mind is to make the first three arguments of URL something > like (acf1, acf2, acf3, ...) and push (a,c,f) into **kwargs.] > > Clever fix. A minor problem: what if the two methods contradict each other? Raise an exception, I gue

[web2py] Python vs Mavericks

2013-10-27 Thread Jonathan Lundell
Just FYI, in case this bites you. I had installed Python 2.7.2 on my Mac some time back, and had an override of PATH in .bash_profile to cause it to run. Today I noticed some odd crashes of Python (doing simple stuff from a CLI). I removed the PATH override, and got the (I guess) system default

[web2py] Re: Access the server data in javascript

2013-10-27 Thread Alan Etkin
> > Thanks Derek, but I am facing one more problem. An 'L' gets appended to > integer data. When I try to get the dict into a json, I am facing "Uncaught > SyntaxError: Unexpected token ILLEGAL " error. Any help on this? > Many web2py api objects as query results (Rows objects) or forms have an

[web2py] App deployed on Fedora/Apache. Problem with Load

2013-10-27 Thread AnnG
Hi all, I've deployed an app on a Linux web server using web2py's '1 step' install for Fedora. For connections from www (Chrome and Firefox) and the localhost:8000, the first couple of static pages in the app work ok, but once any Load(...) commands are required I just get the 'Loading...' tex

[web2py] built-in wiki

2013-10-27 Thread 98ujko9
Hello, I am new to web programming. I use web2py built-in wiki: auth.wiki(), the simplest form. Why is it that when I click the preview button the style for markmin items like ``this is some code`` looks OK (code is highlighted, break lines are present) and when I click on submit a record I see

[web2py] App deployed on Fedora/Apache. Problem with Load

2013-10-27 Thread AnnG
Also, I forgot to add, When running app via localhost:8000 on the server, and going into app admin, I can view all the necessary database tables/rows and DB admin page OK. So I don't think it's a problem with DB connectivity. -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] tooltip button in SQLFORM.grid

2013-10-27 Thread libertil
I am trying to figure out a way customize a button in a SQLFORM.grid so that a tooltip text is shown. Is there a simple way to do that in web2py? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] Re: Getting the current record in a custom widget

2013-10-27 Thread Anthony
> > Thanks, Anthony. I am doing something similar by setting a session > variable so that it will work in appadmin forms too. I wonder why widgets > don't get the record since the represent function does. Seems like an > oversight. The "represent" attribute is specifically for displaying th

[web2py] Re: NDB support for GAE

2013-10-27 Thread Massimo Di Pierro
Thank you for the patch. I guess my question is why do we need a new adapter? Is this for backward compatibility because otherwise it would break apps that use Field('...',type='decimal(...)')? On Sunday, 29 September 2013 11:49:36 UTC-5, Quint wrote: > > Hi, > > I think web2py should support ND

[web2py] Re: Getting the current record in a custom widget

2013-10-27 Thread mr.freeze
I wouldn't say the use case is odd but it's definitely complex. Then again, without a context for custom widgets to operate in (i.e. no knowledge of the record or form that they are bound to) only simple use cases are possible. Represent and widget are output/input analogs but for some reason

[web2py] Ticket ID No module named modules

2013-10-27 Thread arutti
Hello, This error doesn't occur on my dev. system Windows 7, same version of web2py and python2.7 web2py™Version 2.7.4-stable+timestamp.2013.10.14.15.16.29PythonPython 2.6.6: /usr/languages/python/2.6/bin/python (prefix: /usr/languages/python/2.6)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceba

[web2py] Scheduler and updating db records

2013-10-27 Thread Ignacio Llamas Avalos Jr
I am trying to create a task where every night the following function is run to decrement the days left on my sticky entries. When I call the function using a controller it does exactly as planned where it grabs the sticky entries and decrements the day by 1. When I use the scheduler it runs, b

[web2py] Newbie authentication question

2013-10-27 Thread Mikael Cederberg
Hi there and thanks for a stellar project - really cool. I am trying to solve an issue that arose and was hoping for a pointer so I can solve it. I am wanting to use the authentication mechanism of web2py pretty much as is, but I need to be able to have one registered user, in some cases, be g

[web2py] Ticket ID __init__() got an unexpected keyword argument 'default'

2013-10-27 Thread arutti
Hello, This is a json error which doesn't occur on my dev. system Windows 7, same version of web2py and python2.7 web2py™Version 2.7.4-stable+timestamp.2013.10.14.15.16.29PythonPython 2.6.6: /usr/languages/python/2.6/bin/python (prefix: /usr/languages/python/2.6)Traceback 1. 2. 3. 4. 5. 6. 7.

[web2py] Re: Ticket ID No module named modules

2013-10-27 Thread Massimo Di Pierro
Can you please try the nightly build? http://www.web2py.com/examples/static/nightly/web2py_win.zip On Sunday, 27 October 2013 22:49:30 UTC-5, arutti wrote: > > > Hello, > > This error doesn't occur on my dev. system Windows 7, same version of > web2py and python2.7 > > web2py™Version 2.7.4-stable

[web2py] Re: Python vs Mavericks

2013-10-27 Thread Christian Foster Howes
thanks! i didn't remember that i had installed python 2.7 myself and had to hack it to run with 10.9! cfh On Sunday, October 27, 2013 1:46:49 PM UTC-7, Jonathan Lundell wrote: > > Just FYI, in case this bites you. > > I had installed Python 2.7.2 on my Mac some time back, and had an override

[web2py] Re: transfer local database to Google App Engine website

2013-10-27 Thread Christian Foster Howes
Also, keep in mind that there is not really a model on GAE big table (google datastore), so there is nothing to view in the console until you write rows to the database. once you write data, you will be able to see the "schema" of the data that was written. cfh On Sunday, October 27, 2013 3:0

[web2py] Re: NDB support for GAE

2013-10-27 Thread Christian Foster Howes
interesting i as skim the NDB docs very quickly and the patch above i see that it is *very* similar to the "DB Datastore"/Big Table. if the APIs are the same then we should just use the same DAL adapter with a parameter to use NDB. Though because of the caching nature of NDB there may be

[web2py] Re: NDB support for GAE

2013-10-27 Thread Quint
Yes, using the same adapter with a parameter is also a possibility i thought of. Don't really know anymore why i choose this. Maybe because initially i wanted to create a plugable thingy without changing the DAL code. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -