[web2py] Re: Heroku error: relation "auth_user" already exists

2012-12-26 Thread Massimo Di Pierro
Don't do drop tables. You should be able to use the heorku interface to drop the db and make a new one. Massimo On Thursday, December 27, 2012 12:25:51 AM UTC-6, Alec Taylor wrote: > > Even on the welcome app, I get this error. > > As a last resort I even tried adding this to my db.py: > > for

[web2py] Re: delete uploads with SQLFORM.factory

2012-12-26 Thread Paolo
Hi Massimo, I've just tried to post and then edit with both SQLFORM.factory having uploadseparate but nothing has changed. The problem is still there, actually I am making explicitly inserts and edits. The whole SQLFORM.factory to edit a field is this: for field in ['title','descr

[web2py] Heroku error: relation "auth_user" already exists

2012-12-26 Thread Alec Taylor
Even on the welcome app, I get this error. As a last resort I even tried adding this to my db.py: for table_name in db.tables(): db[table_name].drop() db.commit() But that made no difference to the error. Here's the ticket: http://fiddle.jshell.net/dP5t9/show How do I get the db to work p

[web2py] Re: Upload form, onvalidation and postbacks

2012-12-26 Thread Andy Salnikov
Hi Massimo, thanks, I checked out trunk version from today and it is indeed fixed now. Happy holidays, Andy On Sunday, December 23, 2012 9:34:38 PM UTC-8, Massimo Di Pierro wrote: > > I think this is now fixed in trunk. Please check it. > > On Sunday, 23 December 2012 12:01:28 UTC-6, Andy Salnik

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Mandar Vaze / मंदार वझे
On Wed, Dec 26, 2012 at 11:08 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > there is a ticket about. I understand the problem but there is a logic > problem. if is_active=False with versioning it means the record was > deleted. So the record is ignored. It should not be visible at a

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-26 Thread Mandar Vaze / मंदार वझे
On Thu, Dec 27, 2012 at 5:18 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Can you please open a ticket about this? There is already one opened for this : http://code.google.com/p/web2py/issues/detail?id=1234 Unless your email was meant for Boris and his buttonurl code change. (It

[web2py] Re: Beware auth.enable_record_versioning

2012-12-26 Thread Massimo Di Pierro
BTW... the book is now a public web2py app available on github. You can run and search the book locally without a connection. Massimo On Wednesday, 26 December 2012 19:55:39 UTC-6, rh wrote: > > On Wed, 26 Dec 2012 15:49:50 -0800 (PST) > Massimo Di Pierro > > wrote: > > > > http://web2py.com

[web2py] Re: Beware auth.enable_record_versioning

2012-12-26 Thread Massimo Di Pierro
The new edition is coming out by the end of january anyway. Perhaps sooner. Massimo On Wednesday, 26 December 2012 19:55:39 UTC-6, rh wrote: > > On Wed, 26 Dec 2012 15:49:50 -0800 (PST) > Massimo Di Pierro > > wrote: > > > > http://web2py.com/books/default/search/29?search=enable_record_versi

[web2py] Re: How to update variables in a browser address field without calling redirect?

2012-12-26 Thread Anthony
When the browser does a refresh, it requests the same URL, so if you want to change the URL, you'd have to do a redirect. I suppose another option would be to send the page back with some Javascript that changes the query string upon page load, but I'm not sure that's much better than just doing

[web2py] How to update variables in a browser address field without calling redirect?

2012-12-26 Thread Pearu Peterson
Hi, Say, I have a controller def foo(): if not response.vars: redirect(URL(vars = dict(count = 0))) new_count = int(response.vars.count) + 1 # How to update response.vars.count to new count? return P('Hello') In a browser, when hitting http://.../foo then page is redirect

[web2py] Re: The book updates and status

2012-12-26 Thread Alan Etkin
El miércoles, 26 de diciembre de 2012 00:58:01 UTC-3, Massimo Di Pierro escribió: > > So should we go with Serif or Sans Serif? To me Serif seems more > professional. Any kindle book I have is Serif. Street sign and google group > posts are Sans Serif (Helvetica). The Python official doc pdf's

[web2py] Re: Beware auth.enable_record_versioning

2012-12-26 Thread Massimo Di Pierro
http://web2py.com/books/default/search/29?search=enable_record_versioning On Wednesday, 26 December 2012 17:18:08 UTC-6, rh wrote: > > On Thu, 20 Dec 2012 11:21:21 -0800 (PST) > Cliff Kachinske > wrote: > > > To enable archiving, I added enable_record_versioning(db) = True to > > my models file

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-26 Thread Massimo Di Pierro
Can you please open a ticket about this? On Wednesday, 26 December 2012 13:40:15 UTC-6, BJ wrote: > > The problem is in sqlhtml.py > > In latest version from line 2293-2297 is following content: > > if deletable and (not callable(deletable) or deletable(row)): > row_buttons

[web2py] Re: delete uploads with SQLFORM.factory

2012-12-26 Thread Massimo Di Pierro
Did you upload the file first and then add uploadseparate/uploadfolder? On Wednesday, 26 December 2012 12:49:01 UTC-6, Paolo wrote: > > Hi all, > it seems to me that SQLFORM.factory doesn't honor the uploadseparate > option because I'am not able to delete the uploaded file with > SQLFORM.fact

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-26 Thread Arnon Marcus
>From what I recently learned, when the question is "is client-side less secure?", then the short answer is "not necessarily", and the longer answer is these 2 talks: https://www.youtube.com/watch?v=w9hHHvhZ_HY https://www.youtube.com/watch?v=oBqeDYETXME :) On Wed, Dec 26, 2012 at 9:19 AM, Jef

Re: [web2py] Re: new plugin - web2py Form Wizard - PowerFormWizard

2012-12-26 Thread juaneduardo
Bruno to solve 'PowerFormWizard' object has no attribute 'readonly' I added 2 lines to powerForm plugin In modules/plugin_PowerFormWizard.py def __init__(self, table, steps, formstyle = 'divs', options={}, _i

[web2py] Re: generating svg from controllers

2012-12-26 Thread jonas
Nice. now it works On Wednesday, December 26, 2012 7:11:53 PM UTC, Anthony wrote: > > def index(): > a="" > return a > > If you return a string, web2py does not call a view but returns only that > string. To call a view, you have to return a dict: > > def index(): > return dict(a="")

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-26 Thread BJ
The problem is in sqlhtml.py In latest version from line 2293-2297 is following content: if deletable and (not callable(deletable) or deletable(row)): row_buttons.append(gridbutton( 'buttondelete', 'Delete', callback=

[web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Derek
If auditing is turned on, you need to be able to see that the record was once deleted. I believe that to undelete, you should create a new record with is_active set to true. On Wednesday, December 26, 2012 10:38:27 AM UTC-7, Massimo Di Pierro wrote: > > there is a ticket about. I understand the

[web2py] Re: generating svg from controllers

2012-12-26 Thread Derek
Have you tried: a = XML("") ? On Wednesday, December 26, 2012 11:52:54 AM UTC-7, jonas wrote: > > Hi. Is there any way to generate xml svg via controllers? svg can be made > by using declarative syntax, i.e xml instead of javascript. is it possible > to return an string containing svg xml and

[web2py] Re: generating svg from controllers

2012-12-26 Thread Paolo
Hi, this should work: return XML(a) paolo On Wednesday, December 26, 2012 7:52:54 PM UTC+1, jonas wrote: > > Hi. Is there any way to generate xml svg via controllers? svg can be made > by using declarative syntax, i.e xml instead of javascript. is it possible > to return an string containing s

[web2py] Re: generating svg from controllers

2012-12-26 Thread Anthony
def index(): a="" return a If you return a string, web2py does not call a view but returns only that string. To call a view, you have to return a dict: def index(): return dict(a="") Then in the view, to prevent the XML string from being escaped, you have to wrap it in the XML() he

[web2py] generating svg from controllers

2012-12-26 Thread jonas
Hi. Is there any way to generate xml svg via controllers? svg can be made by using declarative syntax, i.e xml instead of javascript. is it possible to return an string containing svg xml and render it in index.html? for example, a very simple function, index.py: def index(): a="" r

[web2py] delete uploads with SQLFORM.factory

2012-12-26 Thread Paolo
Hi all, it seems to me that SQLFORM.factory doesn't honor the uploadseparate option because I'am not able to delete the uploaded file with SQLFORM.factory form = SQLFORM.factory(db.club, db.cities, _class='well', formstyle='bootstrap', showid= False,

[web2py] Re: Upload file from bash script

2012-12-26 Thread Alfonso Pastor Sierra
Curl is a software (as wget) than you can install in a linux system (for Debian and derivatives): sudo apt-get install curl You can run curl from the bash shell or a shell script. More info: http://curl.haxx.se/docs/faq.html Also you can find a Windows/MSDOS version: http://curl.haxx.se/d

Re: [web2py] Where to host web2py

2012-12-26 Thread Gustavo Souza
Hi Adrew, I followed these steps and was able to deploy the web2py, and it works! ... I did with version 2.3.2 My only problem is that the web2py admin panel is disabled. I created the file "parameters_443.py" and put the password hash, but still the message appears "admin disabled because unable

[web2py] Re: Upload file from bash script

2012-12-26 Thread lucas
i am new to curl and after doing a bit of research on it, i think i am more confused. first, this statement is just hanging around. it doesn't seem to be under a function like under "def upload():" > curl -X POST -d @localfilename > http://user:pass@m127.0.0.1:8000/yourapp/default/upload/gi

[web2py] Re: Upload file from bash script

2012-12-26 Thread Massimo Di Pierro
Bash shell. It is not python code. On Wednesday, 26 December 2012 10:23:35 UTC-6, lucas wrote: > > i don't get the above curl statement. it seems to just be floating around > and not under a function or something. so how is it executed? > > also, curl supposedly is native to python 2.6, but i d

[web2py] Re: My experience with heroku... also: unable to get database connection

2012-12-26 Thread Massimo Di Pierro
Did you look at all into: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-heroku.sh https://github.com/web2py/web2py/blob/master/gluon/contrib/heroku.py You must use db = get_db() not db=DAL() on heroku. On Wednesday, 26 December 2012 07:05:55 UTC-6, Alec Taylor wrote: > > Bee

[web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Massimo Di Pierro
there is a ticket about. I understand the problem but there is a logic problem. if is_active=False with versioning it means the record was deleted. So the record is ignored. It should not be visible at all except for auditing purposes. Now you are trying to bring it back to life (undelete it).

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-26 Thread Jeff Kusi
I have a question about security (it may be unfounded), Isn't server-side interpretation more secure? Especially when business logic that doesn't pass as "controller" code is embedded into the view code. Brython would exposed such code to a front-end user. What are your thoughts? On Saturday

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-26 Thread Jose
El miércoles, 26 de diciembre de 2012 09:01:51 UTC-3, Jose escribió: > > > > El martes, 25 de diciembre de 2012 17:44:01 UTC-3, Alan Etkin escribió: >> >> I've moved the table style to web2py.css and changed the xml generation >>> with helpers to cleanup appadmin. Attached are the proposed diffs

Re: [web2py] Re: prevent users to access a record by changing the url

2012-12-26 Thread António Ramos
Gotcha! 2012/12/26 Anthony > You can use the Auth system to set permissions ( > http://web2py.com/books/default/chapter/29/09#Authorization), or you > might consider using digitally signed URLs ( > http://web2py.com/books/default/chapter/29/04#Digitally-signed-urls). > With the latter solution,

[web2py] Re: prevent users to access a record by changing the url

2012-12-26 Thread Anthony
You can use the Auth system to set permissions ( http://web2py.com/books/default/chapter/29/09#Authorization), or you might consider using digitally signed URLs ( http://web2py.com/books/default/chapter/29/04#Digitally-signed-urls). With the latter solution, the signature is a hash of the URL, so

[web2py] Re: Upload file from bash script

2012-12-26 Thread lucas
i don't get the above curl statement. it seems to just be floating around and not under a function or something. so how is it executed? also, curl supposedly is native to python 2.6, but i don't have it in any of my pythons. so is curl just part of the linux shell or is it a python function?

Re: [web2py] prevent users to access a record by changing the url

2012-12-26 Thread Vinicius Assef
You must write the business logic by yourself, or add a permission (in Auth) to just allow some records. On Wed, Dec 26, 2012 at 1:43 PM, António Ramos wrote: > hello > i have a controller that filters what the user can see. > > the view show some links to record. > > for example the user A can

[web2py] prevent users to access a record by changing the url

2012-12-26 Thread António Ramos
hello i have a controller that filters what the user can see. the view show some links to record. for example the user A can only see one button to access a record the button has this link http://127.0.0.1:8000/EmpreiteirosA/default/showemp/7 but if the user changes the url by hand to end for e

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-26 Thread Alec Taylor
On Sun, Dec 16, 2012 at 6:39 AM, Massimo Di Pierro wrote: > I was thinking the same. The issue, do we want the conversion done > client-side (like brython) or server side (like ocl, > https://github.com/mdipierro/ocl#convert-python-code-into-javascript-code) > > I'd prefer brython if it is fast. >

Re: [web2py] Re: web3py?

2012-12-26 Thread Alec Taylor
+1 to WebRTC example app On Wed, Dec 26, 2012 at 11:41 PM, Vinicius Assef wrote: > No, this isn't. They use node.js on the server side: http://www.easyrtc.com/ > > > On Sat, Dec 22, 2012 at 3:39 PM, Massimo Di Pierro > wrote: >> Very interesting. Looks like it completely client-side so it should

[web2py] My experience with heroku... also: unable to get database connection

2012-12-26 Thread Alec Taylor
Been using Red Hat OpenShift for 6-months now, but have been annoyed with their lack of DNS. A or CNAMEs simply aren't the same. So today I thought to try with Heroku. Here's a step-by-step setup guide: 1. Follow these steps: https://devcenter.heroku.com/articles/quickstart 2. Grab the version o

Re: [web2py] Re: web3py?

2012-12-26 Thread Vinicius Assef
No, this isn't. They use node.js on the server side: http://www.easyrtc.com/ On Sat, Dec 22, 2012 at 3:39 PM, Massimo Di Pierro wrote: > Very interesting. Looks like it completely client-side so it should work > without problems with web2py. > > Massimo > > > On Saturday, 22 December 2012 11:35:

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-26 Thread Vinicius Assef
Very good, Francois! :-) On Fri, Dec 21, 2012 at 7:20 PM, Francois Dion wrote: > If you have had issues with these, you should report the bugs, because It > does support string interpolation, modules and scope. List comprehension and > the ternary operator have been added earlier this week. Clas

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-26 Thread Jose
El martes, 25 de diciembre de 2012 17:44:01 UTC-3, Alan Etkin escribió: > > I've moved the table style to web2py.css and changed the xml generation >> with helpers to cleanup appadmin. Attached are the proposed diffs for >> appadmin.py and web2py.css. >> >> > Oops! That would never work (sorry,

[web2py] Re: Custom form delete Crud checkbox

2012-12-26 Thread Alan Etkin
El martes, 25 de diciembre de 2012 23:35:21 UTC-3, Massimo Di Pierro escribió: > > I am not convinced. > > It is in > > form.custom.delete > > why does it need to be also in > > form.custom.delete_this_record > > Perhaps in web3py we can rename it but why have it in two places in web2py

[web2py] Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Mandar Vaze
I am also seeing this problem. Using Version 2.3.2 (2012-12-17 15:03:30) stable I get a flash "done" on submit. but is_active is still False. I wouldn't call it "failing silently" either. Should I file a bug ? -Mandar On Monday, July 16, 2012 12:16:24 AM UTC+5:30, simon wrote: > > If you edit