[web2py] Re: IntegrityError: column email is not unique

2013-12-17 Thread Massimo Di Pierro
The problem is that my workaround is not retroactive. I believe the bug is fixed but does not apply to tables created before the upgrade with the fixed code. You have to manually alter table and remove the UNIQUE attribute. web2py is not smart enough to be able to do that. On Tuesday, 17 Decemb

Re: [web2py] Re: sessions2trash cron

2013-12-17 Thread Jayadevan M
Thanks. For each app, I will add a line to web2py.ini like python /var/www/web2py/web2py.py -Q -S myapp1 -M -R scripts/sessions2trash.py -A -o python /var/www/web2py/web2py.py -Q -S myapp2 -M -R scripts/sessions2trash.py -A -o ? On Wed, Dec 18, 2013 at 1:26 AM, Niphlod wrote: > here > https://g

Re: [web2py] How to include symbols as ✎ or ✆ in a the helper A()?

2013-12-17 Thread Omar Meat Boy Gutiérrez
It works enclosing the text with XML(). Thanks! On Tuesday, December 17, 2013 7:29:21 PM UTC-6, Roberto Perdomo wrote: > > Try with something like: > > {{=A(XML('✖'), _href=URL('default', 'delete', args=[row.id]))}} > > > > > 2013/12/17 Omar Meat Boy Gutiérrez > > >> >> I have a table of items w

[web2py] How to show HTML entitie symbols using A helper?

2013-12-17 Thread Omar Meat Boy Gutiérrez
I am trying to show a delete symbol like this ✕ or this: ✖. My code is: {{=A('✖', _href=URL('default', 'delete', args=[row.id]))}} My result is simply: ✖ If I use HTML I get the desired result; ✖ However, I'd like to do it using *A helper* because I want to take advantage of it. What am

Re: [web2py] How to include symbols as ✎ or ✆ in a the helper A()?

2013-12-17 Thread Roberto Perdomo
Try with something like: {{=A(XML('✖'), _href=URL('default', 'delete', args=[row.id]))}} 2013/12/17 Omar Meat Boy Gutiérrez > > I have a table of items with a special column to delete each item. I'd > like include a symbol like: ✖ or ✕ or ✗, in this way: > > X Y Z Delete > ---

[web2py] How to include symbols as ✎ or ✆ in a the helper A()?

2013-12-17 Thread Omar Meat Boy Gutiérrez
I have a table of items with a special column to delete each item. I'd like include a symbol like: ✖ or ✕ or ✗, in this way: X Y Z Delete - xy z [✖] xy z [✖] I am trying with: {{=A('✖', _href=URL('default', 'delete', args=[row.id]))}} howev

[web2py] Re: List:string display missing the + and - since about 2.7

2013-12-17 Thread Mark Kirkwood
Confirmed, the excellent quality of the Changelog included with the src is much appreciated. I must remember to read it *before* posting questions... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.c

[web2py] Re: List:string display missing the + and - since about 2.7

2013-12-17 Thread Mark Kirkwood
I think this is due to me forgetting to update static/js/web2py.js from the 2.7 or 2.8 welcome app, but will confirm. -- 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

[web2py] List:string display missing the + and - since about 2.7

2013-12-17 Thread Mark Kirkwood
I'm making use of list:string to store registration numbers (for cats): db.define_table( 'cat', ... Field('reg_numbers', 'list:string'), format = '%(name)s' ) and using sqlform.grid in the 'cat' controller. For web2py versions <= 2.4.x this worked fine - displaying a text

Re: [web2py] Apostrophe's disapperaing

2013-12-17 Thread Jonathan Lundell
On 17 Dec 2013, at 3:32 PM, Dave S wrote: > On Monday, December 16, 2013 7:15:12 AM UTC-8, Jonathan Lundell wrote: > On 16 Dec 2013, at 2:18 AM, peter wrote: >> I am impressed at how helpful you have been on this Jonathon. >> >> It does say in the mht file that it is windows-1252 encoded. >> >>

Re: [web2py] Apostrophe's disapperaing

2013-12-17 Thread Dave S
On Monday, December 16, 2013 7:15:12 AM UTC-8, Jonathan Lundell wrote: > > On 16 Dec 2013, at 2:18 AM, peter > > wrote: > > I am impressed at how helpful you have been on this Jonathon. > > It does say in the mht file that it is windows-1252 encoded. > > It turns out that > s.decode('cp1252

[web2py] Re: login crash under 2.8.2

2013-12-17 Thread Massimo Di Pierro
t would help a lot to know what the session object looks like so that we can try reproduce the problem. I assume this is for a particular session object. Can you retrieve the session_id from the cookie and send me the corresponding file? Do you know how the lock object gets into the session? I

Re: [web2py] Re: login crash under 2.8.2

2013-12-17 Thread Massimo Di Pierro
I do not fully understand the details but there is a note in the pyhton docs that says that __getstate__ can return False. If it does __setstate__ is not called. If I change __getstate__ to return dict(self) or if I remove it, sessions break. On Tuesday, 3 December 2013 13:50:33 UTC-6, Jonathan

[web2py] Re: IntegrityError: column email is not unique

2013-12-17 Thread Chris Hepworth
Running version 2.8.2-stable+timestamp.2013.11.28.13.54.07 I recieved the same error as described above. I also tried to use the workaround Massimo suggested below, but without success, the update still fails. Do I need to delete my current archive table before attempting this? On Monday, July

Re: [web2py] Re: Password Transmitted in plain text

2013-12-17 Thread Jonathan Lundell
On 17 Dec 2013, at 2:28 PM, P T wrote: > Thank you Leonel and Jonathan, > > But, thees lines require that I run a https server. Can we configure Rocket > server for https or should I deploy something like Apache? Rocket supports SSL if the ssl module is available on the system. You'll need a c

[web2py] Re: Password Transmitted in plain text

2013-12-17 Thread P T
Thank you Leonel and Jonathan, But, thees lines require that I run a https server. Can we configure Rocket server for https or should I deploy something like Apache? Thanks for the help, PT On Tuesday, December 17, 2013 4:11:57 PM UTC-6, Leonel Câmara wrote: > > Of course they are. Use HTTPS

Re: [web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread ivo . nijenhuis
Thank you! Will spend tomorrow figuring it out. Thanks for the example! Sent from my iPhone On 17 dec. 2013, at 23:21, Niphlod wrote: > you just need to figure out a "key" to separate different forms, and use > formname accordingly as stated in the book. > I do it in w2p_tvseries already, you

[web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread Niphlod
you just need to figure out a "key" to separate different forms, and use formname accordingly as stated in the book. I do it in w2p_tvseries already, you can take a look at https://github.com/niphlod/w2p_tvseries/blob/master/controllers/manage.py specifically, see lines #169, #239 and #266 -- R

Re: [web2py] Password Transmitted in plain text

2013-12-17 Thread Jonathan Lundell
On 17 Dec 2013, at 2:08 PM, P T wrote: > I deployed a small app on the intranet and noticed that the username and > password are transmitted in plain text (using a tool WireShark, > http://www.wireshark.org/). > > Here is my setup: > 2.8.2-stable+timestamp.2013.11.28.13.54.07 > (Running on Roc

[web2py] Re: Password Transmitted in plain text

2013-12-17 Thread Leonel Câmara
Of course they are. Use HTTPS if you don't want that to happen. request.requires_https() and session.secure() Are your friends. Terça-feira, 17 de Dezembro de 2013 22:08:34 UTC, P T escreveu: > > I deployed a small app on the intranet and noticed that the username and > password are transmitt

[web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread Ivo
I understand that I need to use different formnames, I just don't understand how I would syntax it do that automatically. A single form will not suffice; I think is has to be different forms. I need a uuid for each user and create/update several records for each user. Basically I need to use some

[web2py] Password Transmitted in plain text

2013-12-17 Thread P T
I deployed a small app on the intranet and noticed that the username and password are transmitted in plain text (using a tool WireShark, http://www.wireshark.org/). Here is my setup: 2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Rocket 1.2.6, Python 2.7.6) Database: Postgresql So, I

[web2py] Re: uploading files on GAE - 404 NOT FOUND

2013-12-17 Thread Alan Etkin
> Are there meant to be limitations around compute on GAE? > I don't think so, this could be a bug. Please file an issue and we'll try to reproduce and fix it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: DAL issues on production server (xen VM)

2013-12-17 Thread Niphlod
they should be separated and they are separated from what I see in the code. the db connection of the scheduler is on the main thread while the one used by the task is inside the spawned process (the executor() function). I don't see connections shared between the two. On Monday, Decemb

[web2py] Re: how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
Currently I manage the upload folder in the controller with a function called by a ajax request. But, for code optimization, I would prefer it be in the model. I use this table in multiple pages and for different data files (jpg, tiff, pdf) and I would like to manage it in a single code. Il gior

[web2py] Re: sessions2trash cron

2013-12-17 Thread Niphlod
here https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh#L145 uwsgi takes care of it with the default setup, with the added bonus that the user running uwsgi has all the necessary permission to run that script. On Tuesday, December 17, 2013 7:04:19 AM UTC+1, J

[web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread Massimo Di Pierro
What does the model look like? You amy want to create a single form with fields for each user. On Tuesday, 17 December 2013 05:14:25 UTC-6, Ivo wrote: > > I want to create multiple forms with a 'for' statement and > validate/process them. > the amount of forms to generate is dependent on a list

[web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread Niphlod
you need to use different formname(s) to be able to process them separately. take a look here http://web2py.com/books/default/chapter/29/07/forms-and-validators#Multiple-forms-per-page On Tuesday, December 17, 2013 12:14:25 PM UTC+1, Ivo wrote: > > I want to create multiple forms with a 'for' sta

[web2py] Re: we2py sql fetch

2013-12-17 Thread Massimo Di Pierro
Yes. psycopg2 has priority over pg8000. On Tuesday, 17 December 2013 09:03:46 UTC-6, Jayadevan M wrote: > > I did a pip install psycopg2. If it is there,web2py will use it by > default? Now the repeat fetches have disappeared. > > On Tuesday, December 17, 2013 7:58:26 PM UTC+5:30, Massimo Di Pier

[web2py] Re: Error accessing users in Instant Press

2013-12-17 Thread Alan Etkin
> > Please how can we fix this Issue? > There is a bug in modules/plugins/user.py Go to line 149 and add db.auth_user.registration_key to the list assigned to fields. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] web2py Jobs and meetups

2013-12-17 Thread Massimo Di Pierro
I am interested in knowing who are the web2py developers in Illinois and in California (possibly around San Francisco) for possible meet ups. If you live near Chicago or near San Francisco, please email me. If you do not leave in one of these places but you would be interested in moving to the

[web2py] Re: login crash under 2.8.2

2013-12-17 Thread Leonel Câmara
I'm still getting another problem if I store cookies in files as usual: Traceback (most recent call last): File "C:\blueweb2py\gluon\main.py", line 479, in wsgibase session._try_store_in_cookie_or_file(request, response) File "C:\blueweb2py\gluon\globals.py", line 1089, in _try_store_in_c

[web2py] Re: error using auth.wiki('slug') on service pages

2013-12-17 Thread Alan Etkin
> > Thanks for reply. In attachment you can see what I get on service pages > (_edit, _editmedia, _search...) > Here presented is happening on wiki/default/index/_edit/index > > On _editmedia i get > {'content': } > > On _search > {'content': } > > As a workaround you could try replacing the wiki

[web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Brian M
OK, I've got a simple app that shows the behavior: controllers/demo.py # coding: utf8 # try something like def index(): return dict(message="hello from demo.py") def edit_loader(): loader = LOAD(f='edit_form', ajax=True)#change to ajax=False and form is shown in dialog return dic

[web2py] sqlstatements in tracebacks are quite short

2013-12-17 Thread Remco Boerma
Hi, Sometimes some errors are a little hard to debug because of the crammed representation in the tracebacks. Especially when something with the database goes wrong and you can't see the entire sql statement being fired. Insert this in your model and see more of the statement in the traceback.

Re: [web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Brian M
Chrome's JS Console isn't showing anything either. All it has is a note about "event.returnValue is deprecated. Please use the standard event.preventDefault() instead. " but that's coming from jquery.js itself (v1.10.2) and not my code so I don't think that's the cause. I'm also noticing that a

[web2py] Re: Error accessing users in Instant Press

2013-12-17 Thread Luis M Sanchez
Andrew W writes: > > > I logged that one, and I emailed Martin with details of a fix.Hoping to here from him. On Sunday, September 30, 2012 5:47:22 AM UTC+13, Jimi wrote: > Never mind, I see now it's been logged as an issue.On Sunday, September Hello, It seems that this issue haven´t been re

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread Paolo Valleri
logs should be placed in /var/log/apache2/ and /var/log/wsgi can you also check if the string after alias_match in /etc/apache2/sites-available/default matches the one mentioned here: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-ubuntu.sh#L148 Paolo On Tuesday, Decembe

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
I did a pip install psycopg2. If it is there,web2py will use it by default? Now the repeat fetches have disappeared. On Tuesday, December 17, 2013 7:58:26 PM UTC+5:30, Massimo Di Pierro wrote: > > What if you use psycopg2? > > Massimo > > On Tuesday, 17 December 2013 08:25:01 UTC-6, Jayadevan M w

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
I can try and get back. Any documentation link on how to make web2py use psycopg2? I am very much a web2py/pyhon newbee. On Tuesday, December 17, 2013 7:58:26 PM UTC+5:30, Massimo Di Pierro wrote: > > What if you use psycopg2? > > Massimo > > On Tuesday, 17 December 2013 08:25:01 UTC-6, Jayadevan

[web2py] Re: we2py sql fetch

2013-12-17 Thread Massimo Di Pierro
What if you use psycopg2? Massimo On Tuesday, 17 December 2013 08:25:01 UTC-6, Jayadevan M wrote: > > No. The number of fetches go up when the number of records go up. It is a > very simple test case. First I inserted 100 records. > insert into myt (nm, title) select generate_series(1,100), 'A'

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
No. The number of fetches go up when the number of records go up. It is a very simple test case. First I inserted 100 records. insert into myt (nm, title) select generate_series(1,100), 'A'; There was just one fetch. Then I inserted many more insert into myt (nm, title) select generate_series(

[web2py] Re: we2py sql fetch

2013-12-17 Thread Massimo Di Pierro
You may have hidden recursive selects, for example in a represent function. On Tuesday, 17 December 2013 07:41:47 UTC-6, Jayadevan M wrote: > > When I turned on logging for PostgreSQL during testing, I see that the > number of fetches goes up dramatically for tables with a large number of > rows

[web2py] Re: how to refer to other field in filter_in filter_out?

2013-12-17 Thread Anthony
If you're dealing with form submissions, you could get the value from request.post_vars.nome. Note, if you change the upload folder dynamically, you will also need a way to set it when you retrieve the file. Anthony On Tuesday, December 17, 2013 7:35:09 AM UTC-5, Ivan Gazzola wrote: > > db.defi

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread Richard Brown
Hi Paolo, there are no error messages in the Chrome Console, just a 'cancelled' status against the file to be edited under the Network tab. The details are in my posts on Dec 10 in response to Massimo's question. I will try map_hyphen this evening - is this to be added to 'routes.py' as desc

[web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Anthony
We probably need to see some code. On Tuesday, December 17, 2013 12:44:23 AM UTC-5, Brian M wrote: > > This would seem to be the same issue as > https://groups.google.com/d/topic/web2py/kyEYmfQs6L0/discussion but yet > the solution offered there (make sure you've got the latest web2py.js) > do

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread Leonel Câmara
BTW Richard, the scheduler db locking problems are to be expected if you're using sqlite, what you should do is to use one sqlite database for the scheduler and another for the rest of your app. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2

[web2py] we2py sql fetch

2013-12-17 Thread Jayadevan M
When I turned on logging for PostgreSQL during testing, I see that the number of fetches goes up dramatically for tables with a large number of rows. For example - 2013-12-17 19:08:03 IST [19893]: [791-1] user=myserrhpa,db=everest1 LOG: duration: 0.093 ms execute fetch from /pg8000_portal_10:

[web2py] Re: web2py ala static-site-generator

2013-12-17 Thread Massimo Di Pierro
I once made a static side generator that allows to create pages using the web2py template languages and or markmin (depending on the extension). https://github.com/mdipierro/countach It takes a tree structure of files, process them all, and creates a new tree structure. Pages can extend a paren

Re: [web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread paolo.vall...@gmail.com
the editor requires several files, I'm just wondering if you get all of them, can you check if there are error in Chrome console? Moreover, please check apache logs, if something is not working there. have you enabled map_hyphen ? Paolo 2013/12/17 Richard Brown > Hi Paolo, as a C programming,

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread Richard Brown
Hi Paolo, as a C programming, PC-using hardware engineer bumbling around in Linux-land I came across this sequence of commands: wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh chmod +x setup-web2py-ubuntu.sh sudo ./setup-web2py-ubuntu.sh So whatever it does that is what I hav

Re: [web2py] Re: Another multiple file upload and file drop area demo, this time using dropzone.js

2013-12-17 Thread Ruud Schroen
Ah! Very nice :) On Tue, Dec 17, 2013 at 1:22 PM, Leonel Câmara wrote: > Yes, all validators work since the usual SQLFORM form processing is always > done. IS_IMAGE is actually demonstrated to work in this demo as we needed > that to make the thumbnails. > > -- > Resources: > - http://web2py.com

[web2py] how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
db.define_table('files', Field('nome','reference Nomi',required=True, requires=[IS_IN_DB(db, 'Nomi.id')]), Field('title', "string", unique=False,label="Descrizione"), Field('note'), Field('immagine', 'upload', autodelete=True), Field('datecreated','datetime',default=now,readable=

Re: [web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Brian Meredyk
Thanks Massimo I will give that a try. Was using firebug last night but wasn't seeing any errors or anything. On Dec 17, 2013 12:53 AM, "Massimo Di Pierro" wrote: > Try check with the google chrome js console. It should tell you what is > going on. > > On Monday, 16 December 2013 23:44:23 UTC-6,

[web2py] Re: Another multiple file upload and file drop area demo, this time using dropzone.js

2013-12-17 Thread Leonel Câmara
Yes, all validators work since the usual SQLFORM form processing is always done. IS_IMAGE is actually demonstrated to work in this demo as we needed that to make the thumbnails. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Another multiple file upload and file drop area demo, this time using dropzone.js

2013-12-17 Thread Ruud Schroen
Nice! I'll try it out later today! Just one question, does the web2py validation also work on this? For example IS_IMAGE? On Monday, December 16, 2013 7:21:01 PM UTC+1, Leonel Câmara wrote: > > I did this to see how I could integrate dropzone.js ( > http://www.dropzonejs.com/ ) with web2py as

[web2py] Re: error using auth.wiki('slug') on service pages

2013-12-17 Thread Janko Strusa
Thanks for reply. In attachment you can see what I get on service pages (_edit, _editmedia, _search...) Here presented is happening on wiki/default/index/_edit/index On _editmedia i get {'content': } On _search {'content': } As you can see, they are slightly different. In earlier version (2.6.

[web2py] how do I create, multiple forms and precess them, using 'for' statement?

2013-12-17 Thread Ivo
I want to create multiple forms with a 'for' statement and validate/process them. the amount of forms to generate is dependent on a list containing user id's. the list is dynamic; so I have a function generating a list, 'users', which contains: user:1L, user:4L, etc... now I want to create a form

[web2py] Re: web2py ala static-site-generator

2013-12-17 Thread Gour
On Mon, 16 Dec 2013 13:46:22 -0800 (PST) "Yassen D." wrote: > How about generating most of the pages and serving them as static > content (e.g. templates that have nothing to render, just plain > HTML); Is there a way to generate such content offline, e.g. via xmlrpc or something? > then havin

Re: [web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread paolo.vall...@gmail.com
Hi Richard, which webserver are you using? Let us know more info about the infrastructure you have build on the rpi Paolo 2013/12/16 Richard Brown > OK, to answer Paolo's question on Friday as to what had changed to make it > not work at all - nothing, only the passage of time. So as an expe