[web2py] Re: upgrade clear session

2014-03-12 Thread Paolo Valleri
Open an issue on google code in order to track its development. if you want, feel free to make a proposal as well. Paolo On Wednesday, March 12, 2014 1:13:11 AM UTC+1, 黄祥 wrote: > > hi, > > i've often seen people have a problem with web2py upgrade related with > session. just an idea, is it poss

[web2py] is_active column in auth_user - a question

2014-03-12 Thread Kiran Subbaraman
Hello, I just recently added a auth.define_tables(signature=True) and noticed that the auth_user table now contains a few additional columns, and this one caught my attention - the "is_active" column. The only documentation I noticed around this is: http://web2py.com/books/default/search/29

[web2py] populate extra elements from one db field and table field

2014-03-12 Thread ctrlSoft
hi db.define_table('sf_contract', Field('id','id', readable=False), Field('sf_login_id', readable=False, writable=False, requires=IS_IN_DB(db, db.sf_login.id)), #. Field('ccdata')) # this field contains a json in ccdata i have to store a json {"expiration_year": "2014", "credit_c

[web2py] Re: Making the DAL orders-of-magnitude faster...

2014-03-12 Thread David Simmons
Hi All I've just come across this thread and wondered if the proposed change made it into a version of Web2py? cheers Dave -- 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] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Tim Richardson
jsonrpc works but not jsonrpc2 -- 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] is_active column in auth_user - a question

2014-03-12 Thread Vinicius Assef
Yes, it is. To avoid the auth.signature from auth tables, call auth.define_tables() before auth.define_tables(signature=True). On Wed, Mar 12, 2014 at 5:44 AM, Kiran Subbaraman wrote: > Hello, > I just recently added a > auth.define_tables(signature=True) > > and noticed that the auth_user t

Re: [web2py] is_active column in auth_user - a question

2014-03-12 Thread Kiran Subbaraman
Thanks for confirming that it is working as designed. I modified the code so that now I perform a auth.define_tables() auth.define_tables(signature=True) * Will this serve the purpose of auditing (date-stamping, and recording user info) changes to the auth tables, for newer records now o

[web2py] Re: upgrade clear session

2014-03-12 Thread Leonel Câmara
It's possible but I don't think it's desirable as people may use session for important persistence information, for example: an online game where users don't register. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

[web2py] submit twice form to update in DB

2014-03-12 Thread ctrlSoft
I have a form, so i have to submit twice to see changes in database, on first submit data is null import json record = db(db.sf_contract.sf_login_id == auth.user.id).select().first() form_ccdata = json.dumps({"credit_card_type":request.vars.credit_card_type,"card_holder_name":request.vars.ca

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Thomas Bellembois
Actually I need to initialize many parameters so I took model on the AutocompleteWidget widget. Le mardi 11 mars 2014 à 12:54 -0400, Richard Vézina a écrit : > Do you really need a class? > > > You can create widget as a simple function as shown in the book. I say > that because it easier to s

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Richard Vézina
Ok... But did you try my suggestion? The way to set the default value is the same, you just have to figure how to set it in the class, it just less obvious some time. Richard On Wed, Mar 12, 2014 at 8:31 AM, Thomas Bellembois < thomas.bellemb...@gmail.com> wrote: > Actually I need to initialize

[web2py] Re: python in javascript extension file (*.js)

2014-03-12 Thread Massimo Di Pierro
Your problem is that you have the {{...}} syntax in a js file: shortcut.add("Ctrl+F12",function() { window.open("{{=URL('default', 'index') }}", "_self"); }); but this is a static file, not a template and therefore it is the {{...}} is never interpreted by web2py. On Wednesday, 12 March 2014

[web2py] Re: Making the DAL orders-of-magnitude faster...

2014-03-12 Thread Massimo Di Pierro
I believe it was. On Wednesday, 12 March 2014 04:43:52 UTC-5, David Simmons wrote: > > Hi All > > I've just come across this thread and wondered if the proposed change made > it into a version of Web2py? > > cheers > > Dave > -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: Internal error Ticket issued: unrecoverable

2014-03-12 Thread TYRANISTAR
No I haven't (not that I know of anyway). How do i check? The command sudo chown www-data.www-data -R * doesn't return anything. And I didn't update web2py either. Τη Τρίτη, 11 Μαρτίου 2014 6:40:37 μ.μ. UTC+2, ο χρήστης Massimo Di Pierro έγραψε: > > This is usually due to web2py unable to writ

[web2py] Web2py 2.9.4 Admin crash on admin/default/user

2014-03-12 Thread Muhammad Aamir
Error ticket for "admin"Ticket ID 127.0.0.1.2014-03-12.14-02-40.add7ae71-817f-4dbf-aaed-5c757eb0913c 'NoneType' object has no attribute 'replace'Versionweb2py™Version 2.9.4-stable+timestamp.2014.03.05.04.44.09 PythonPython 2.7.3: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\h

[web2py] About SQLFORM.grid

2014-03-12 Thread sujin870814
Hello. :D Now I'm using SQLFORM.grid and I have many columns so it made scroll automatically. I don't wanna use scroll, but headers are only written in single line. Is there any method to write it with line break? or any method to control web2py_grid's table attribute? I tried controlling web2py

[web2py] Book - some pictures don't show

2014-03-12 Thread Tom Clerckx
I was browsing through the web2py online book and noticed that some pictures were not rendering in the browser. Looking a bit deeper into it, I noticed that it concerns picture links over HTTPS and that the certificate is not valid. Example: On http://web2py.com/books/default/chapter/29/09/acces

[web2py] web2py book image blog example not working with google app engine launcher?

2014-03-12 Thread Tommi Lahtonen
I am trying web2py for the first time and I am trying to get the example in the book: http://web2py.com/books/default/chapter/29/03/overview to work. I am using goole app engine launcher in windows 7. I managed to write the model (db.py) to create image and post tables. Administration interfac

[web2py] Re: Web2py 2.9.4 Admin crash on admin/default/user

2014-03-12 Thread Massimo Di Pierro
I am confused. Your ticket says that the error is in file File "D:\web2py_src\applications\admin\views\default/user.html" and the error is in line: smt['_class']='btn' but that line is not in user.html and is not in layout.html which is extended by user.html. Perhaps this app was build with

[web2py] Re: python in javascript extension file (*.js)

2014-03-12 Thread 黄祥
thank you so much for your detail explaination, massimo. i've figure it out why and how it works now. e.g. shortcut.add("Ctrl+F12", function() { window.open("/test/default/index", "_self"); }); thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Thomas Bellembois
Yes, I tried but it did not work either... There is something weird, actually my widget receives an integer for value (actually a table reference). I generate a checkbox and then a span with the database entry corresponding to the value such as: row = db(db.table.id == value).select().first() I u

Re: [web2py] is_active column in auth_user - a question

2014-03-12 Thread Vinicius Assef
On Wed, Mar 12, 2014 at 8:42 AM, Kiran Subbaraman wrote: > Thanks for confirming that it is working as designed. > I modified the code so that now I perform a > auth.define_tables() > auth.define_tables(signature=True) Sorry, Kiran. I made a mistake and a great confusion. auth.define_tab

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Richard Vézina
Hmmm... Code please! Richard On Wed, Mar 12, 2014 at 9:56 AM, Thomas Bellembois < thomas.bellemb...@gmail.com> wrote: > Yes, I tried but it did not work either... > > There is something weird, actually my widget receives an integer for > value (actually a table reference). > I generate a check

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Thomas Bellembois
In the attachment. Thomas Le mercredi 12 mars 2014 à 10:26 -0400, Richard Vézina a écrit : > Hmmm... > > > Code please! > > > Richard > > > On Wed, Mar 12, 2014 at 9:56 AM, Thomas Bellembois > wrote: > Yes, I tried but it did not work either... > > There is somethi

Re: [web2py] Re: Making the DAL orders-of-magnitude faster...

2014-03-12 Thread Paolo Valleri
This is the commit https://github.com/web2py/web2py/commit/5f1caf668b2a7d856c242f5866e10dfa77e133a8 I don't know if there are other changes Paolo 2014-03-12 14:32 GMT+01:00 Massimo Di Pierro : > I believe it was. > > > On Wednesday, 12 March 2014 04:43:52 UTC-5, David Simmons wrote: >> >> Hi

[web2py] About SQLFORM.grid

2014-03-12 Thread Tim Richardson
Do you mean you want the headers to wrap? -- 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 Goog

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Michele Comitini
Just put @service.jsonrpc over the action. If the json payload of the client has the key 'jsonrpc' handling of protocol is redirected to jsonrpc2 automatically. To test use wget like: wget --post-data '{"jsonrpc": "2.0", "id": 1, "method": "myfunction", "params": {"a": 1, "b": 2}}' htt

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Michele Comitini
sorry Tim, wrong example. This is the right test: wget --post-data '{"jsonrpc": "2.0", "id": 1, "method": "myfunction", "params": {"a": 1, "b": 2}}' http:// /app/default/call/jsonrpc 2014-03-12 18:45 GMT+01:00 Michele Comitini : > Just put @service.jsonrpc over the action.

Re: [web2py] Custom widget and keepvalue

2014-03-12 Thread Richard Vézina
Thomas, What this widget does exactly, I don't have time to read all this... Could you point me on were in the code you think the problem is... Maybe screenshot of your widget can help me figure out what it does and how... Richard On Wed, Mar 12, 2014 at 10:32 AM, Thomas Bellembois < thomas.be

Re: [web2py] Re: Making the DAL orders-of-magnitude faster...

2014-03-12 Thread David Simmons
> > Thanks both. It is great to see the improvements in Web2py. > cheers Dave -- 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 messag

[web2py] Need help rewriting url so that "http://mydomain.com/myapp" looks like "http://myapp.mydomain.com/"

2014-03-12 Thread Lisandro
I'm using web2py on production with lighttpd. My site has two web2py applications: "init" and "guide". I already created routes.py to hide "init" from the url. In addition, I would like that "guide" application appears as a subdomain, so that every url of this form "mydomain.com/guide/" looks l

[web2py] Images not showed on linux

2014-03-12 Thread jldistefano
Hi, I am developing on windows an application that show images stored in the static folder, it works great on Firefox , Chrome and IE. The problem is when I serve the application from a Linux machine running Ubuntu. The images aren’t showed on Firefox (didn’t try other browser). I tried

[web2py] Re: Images not showed on linux

2014-03-12 Thread LightDot
First thing that comes to mind is that Linux is case sensitive, while Windows is not. So ../Silos/static is different then ../silos/static/... etc. If not, then please provide the actual errors displayed and/or server logs... There must be an error, "no images showed" doesn't tell us much. Reg

[web2py] Want to use Bootstrap 3. Should I wait? Timeframe?

2014-03-12 Thread Brando
I'm about to start changing my styles to use Bootstrap 3, but I don't know if i should just wait until the official update comes that has it baked in. Is Bootstrap 3 integration going to happen in the next few months? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Images not showed on linux

2014-03-12 Thread Leonel Câmara
Besides what LightDot said, if you're using file:// instead of http:// that won't work for obvious reasons. -- 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) --

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Federico Ferraro
It is a bug in the library gluon/contrib/simplejsonrpc.py in line 114. Not specify the protocol version in the request. data = {'id': request_id, 'method': method, 'params': args, } 2014-03-12 14:47 GMT-03:00 Michele Comitini : > sorry Tim, wrong example. This is the right test: > > >

[web2py] Update textarea when dropdown changes

2014-03-12 Thread backseat
I have a db table, t_services, that includes: Field('f_service', type='string', label=T('Service')), Field('f_default_specification', type='text', label=T('Default specification')), Another table, t_line_items, includes: Field('f_service', type='reference t_servic

[web2py] Re: About SQLFORM.grid

2014-03-12 Thread Dave S
On Wednesday, March 12, 2014 10:26:54 AM UTC-7, Tim Richardson wrote: > > Do you mean you want the headers to wrap? Each one within each cell, it sounds like. This should be just a css style applied to the th elements, I would think. Does there need to be a class name used for those element

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Tim Richardson
I patched it last night and Massimo has applied the PR already, so fixed in trunk On Thursday, 13 March 2014 08:39:11 UTC+11, Federico Ferraro wrote: > > It is a bug in the library gluon/contrib/simplejsonrpc.py in line 114. > > Not specify the protocol version in the request. > > data = {'id':

Re: [web2py] Re: jsonrpc2? can't get book example working

2014-03-12 Thread Massimo Di Pierro
Thank you Tim! On Wednesday, 12 March 2014 20:28:40 UTC-5, Tim Richardson wrote: > > I patched it last night and Massimo has applied the PR already, so fixed > in trunk > > On Thursday, 13 March 2014 08:39:11 UTC+11, Federico Ferraro wrote: >> >> It is a bug in the library gluon/contrib/simplej

Re: [web2py] Re: 1054, "Unknown column in 'field list'... Help me

2014-03-12 Thread Johann Spies
I do not use mysql but postgresql. I would try the following: * using the database backend export the table to a csv-file * drop the table in the database backend. * remove the table's entry in applications/yourapp/databases (be careful to delete the correct file). Maybe move it to another tempo