[web2py] Re: Logging of impersonation events

2010-12-07 Thread mdipierro
I will add logging. Mind that it has pointed out that impersonate/0 presents a mild security risk. We have already changed the impersonate action in trunk and not you have to submit the user_id via POST to impersonate. I am still not 100% happy with this but since it is a security issue we are br

[web2py] Logging of impersonation events

2010-12-07 Thread Markus Schmitz
Hi everybody, I am working on a new site, where we also plan to use the impersonation feature for support purposes, which is very helpful. The impersonation works perfectly, but it looks like there is no log in the auth_event table of this happening. Is this intended or did I look at the wrong pl

[web2py] Re: new dal

2010-12-07 Thread mdipierro
I contacted the developer. They added a license which was missing. The replacement is now done in trunk. Vasile, can you please test it? Massimo On Dec 6, 6:36 pm, Vasile Ermicioi wrote: > I am testing new dal (alone, without web2py) and also tested one old idea - > I use pymysql instead of MyS

[web2py] Re: even I have this doubt.

2010-12-07 Thread mdipierro
I cannot think of any problem. On Dec 7, 9:47 pm, appydev wrote: > Thanks. > But, > Am I missing some other functionality? > Am I doing my registration form less safe? > > My fear is that by making myself the registration form, perhaps this making > it less safe. > > Is it so? > > 2010/12/7 mdipi

Re: [web2py] Re: even I have this doubt.

2010-12-07 Thread appydev
Thanks. But, Am I missing some other functionality? Am I doing my registration form less safe? My fear is that by making myself the registration form, perhaps this making it less safe. Is it so? 2010/12/7 mdipierro > I do not see a problem. You do not really need to have a group for > every u

[web2py] Re: even I have this doubt.

2010-12-07 Thread mdipierro
I do not see a problem. You do not really need to have a group for every user, unless you use has_permission and you want to give a specific permission to a single user. Anyway you can create the groups manually too using db.auth_group.insert(...) Massimo On Dec 7, 7:52 pm, appydev wrote: > Gr

Re: [web2py] routes question

2010-12-07 Thread Jonathan Lundell
On Dec 7, 2010, at 4:35 PM, elffikk wrote: > > why that is not working, always shows 'invalid controller' for simple > http://localhost/ request > > routes_in = ( > ('/(.*)', '/myapp/$1'), > ) > > routes_out = ( > ('/myapp/(.*)', '/$1'), > ) Is there any reason we can't include the rewritte

[web2py] even I have this doubt.

2010-12-07 Thread appydev
Greetings. I disable the registration form that generated auth: auth.settings.actions_disabled = ['register'] I made a new registration form that stores information in two tables (auth_user and teacher), with the help of this recipe: http://www.web2pyslices.com/main/slices/take_slice/102 B

[web2py] Re: GAE issue with !=

2010-12-07 Thread mdipierro
does the new dal work for you? On Dec 7, 6:46 pm, howesc wrote: > i am using it.  just tested it out on an application that is running > web2py 1.85.3, which is a bit outdated i suppose. > > do keep in mind that if the value is not set, it will fail all > comparisons, so you must set a default va

[web2py] Re: Autoroutes redirecting to web2py website

2010-12-07 Thread Greg
Ah, ok. That did it. Thanks! On Dec 7, 5:46 pm, Jonathan Lundell wrote: > On Dec 7, 2010, at 3:39 PM, Greg wrote: > > > > > I'm playing around with the new autoroutes, but it's not working how > > I'd expect it to. I copied autoroutes.py from the trunk and put it at > > web2py/routes.py . My rout

[web2py] Re: GAE issue with !=

2010-12-07 Thread howesc
i am using it. just tested it out on an application that is running web2py 1.85.3, which is a bit outdated i suppose. do keep in mind that if the value is not set, it will fail all comparisons, so you must set a default value on any fields that you want to use in a comparison. christian On Dec

[web2py] routes question

2010-12-07 Thread elffikk
why that is not working, always shows 'invalid controller' for simple http://localhost/ request routes_in = ( ('/(.*)', '/myapp/$1'), ) routes_out = ( ('/myapp/(.*)', '/$1'), )

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread mdipierro
He asked: "Someone knows the best way to randomize a Rows dictionary?" The proposed solution randomized the Rows object that you already fethed form the db. You are correct that it does not fetch random rows. On Dec 7, 4:41 pm, Richard wrote: > I think he's after an database-side implementation.

[web2py] Re: new DAL doesn't like functions as represents

2010-12-07 Thread mdipierro
oops. fixed in trunk. On Dec 7, 4:21 pm, Fran wrote: > Traceback (most recent call last): >   File "C:\Bin\web2py\gluon\restricted.py", line 188, in restricted >     exec ccode in environment >   File "C:/Bin/web2py/applications/eden/models/02_pr.py", line 316, in > >     requires = IS_NULL_OR(I

[web2py] Re: new dal

2010-12-07 Thread mdipierro
No. Do not much about it. On Dec 7, 3:45 pm, "G. Clifford Williams" wrote: > Is VoltDB supported? > > Sent from some mobile device > > On Dec 7, 2010, at 2:09 PM, Bruno Rocha wrote: > > > MongoHQ can be useful for testing, they offer a free limited instance > > >https://mongohq.com/pricing > > >

Re: [web2py] Autoroutes redirecting to web2py website

2010-12-07 Thread Jonathan Lundell
On Dec 7, 2010, at 3:39 PM, Greg wrote: > > I'm playing around with the new autoroutes, but it's not working how > I'd expect it to. I copied autoroutes.py from the trunk and put it at > web2py/routes.py . My routes.conf looks like this: > http://pastebin.com/Kqz0FvdC > . I created an app called

[web2py] Autoroutes redirecting to web2py website

2010-12-07 Thread Greg
Hello all, I'm playing around with the new autoroutes, but it's not working how I'd expect it to. I copied autoroutes.py from the trunk and put it at web2py/routes.py . My routes.conf looks like this: http://pastebin.com/Kqz0FvdC . I created an app called autoroutes, and only changed lines 17, 19,

[web2py] Re: Off Topic: HTML5 webapps with Google Closure, Clojure and NoSQL db's

2010-12-07 Thread Richard
very interesting. Does anyone have experience with Google Closure? On Dec 7, 10:00 pm, Tom Atkins wrote: > Interesting way of doing things for web apps: > > http://www.hackers-with-attitude.com/2010/10/using-clojure-nosql-data... > > May have some relevance to web2py with the new support for NoS

RE: [web2py] Re: plugin model execution order

2010-12-07 Thread Josh Jaques
Hey, Just wanted to say that I also ran into a situation recently where it would have been nice to insert a model before db.py, and I wished it was possible. Would be nice to allow 0_plugin_name folders as well. This communication, including any attachments, does not necessarily represent offi

[web2py] Re: Best way to populate GAE datastore?

2010-12-07 Thread Richard
bulkloader may also be helpful: http://code.google.com/appengine/docs/python/tools/uploadingdata.html On Dec 8, 8:27 am, Robert wrote: > Elegant, exactly what I was looking for! > > Thanks! > > On 7 dec, 20:13, Bruno Rocha wrote: > > > I do in model: > > > usually "99_fixtures.py" > > > > > my

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread Richard
I think he's after an database-side implementation. If you used limit and random together then wouldn't you always get the same set of data, rather than random? On Dec 8, 4:13 am, mdipierro wrote: > Not sure I understand our comment: > > rows=db(...).select().sort(lambda row: random.random()) >

[web2py] new DAL doesn't like functions as represents

2010-12-07 Thread Fran
Traceback (most recent call last): File "C:\Bin\web2py\gluon\restricted.py", line 188, in restricted exec ccode in environment File "C:/Bin/web2py/applications/eden/models/02_pr.py", line 316, in requires = IS_NULL_OR(IS_IN_DB(db, "pr_person.id", shn_pr_person_represent)), File "C:\B

Re: [web2py] Re: partial csv import

2010-12-07 Thread Kenneth Lundström
Just curious but are you sure that column 3 on rows 1-15 and 32 onward are empty. When just tested to make a CSV file with Excel 2010 and if column 3 is empty Excel doesn´t put any closing characters on column 2. Kenneth Weird, looks like an Excel'97 bug. It stopped putting the closing comm

Re: [web2py] Re: new dal

2010-12-07 Thread G. Clifford Williams
Is VoltDB supported? Sent from some mobile device On Dec 7, 2010, at 2:09 PM, Bruno Rocha wrote: > MongoHQ can be useful for testing, they offer a free limited instance > > https://mongohq.com/pricing > > > > 2010/12/7 mdipierro > I run some benchmarks. The time to do insert and select is

[web2py] Re: plugin model execution order

2010-12-07 Thread mr.freeze
Ping! On Dec 5, 9:00 pm, "mr.freeze" wrote: > I am trying to create a widget plugin for > this:http://addyosmani.com/blog/the-missing-date-time-selector-for-jquery-ui/ > > I need my plugin model to execute before db.py so that it can be > applied to fields in db.py. > Would you take a patch to a

[web2py] Re: Best way to populate GAE datastore?

2010-12-07 Thread Robert
Elegant, exactly what I was looking for! Thanks! On 7 dec, 20:13, Bruno Rocha wrote: > I do in model: > > usually "99_fixtures.py" > > > my_dict_with_values = dict(field='value',anotherfield='anothervalue') > > if db(db.table).count() == 0: >     db.table.insert(**my_dict_with_values) > > > >

[web2py] Re: partial csv import

2010-12-07 Thread pftpft
Weird, looks like an Excel'97 bug. It stopped putting the closing comma after the second column after the 16th row (then starts back up again after the 32nd). Here's a test CSV: key,value,description key1,value1, key2,value2, key3,value3, key4,value4, key5,value5, key6,value6, key7,value7, key8,

Re: [web2py] Re: new dal

2010-12-07 Thread Bruno Rocha
MongoHQ can be useful for testing, they offer a free limited instance https://mongohq.com/pricing 2010/12/7 mdipierro > I run some benchmarks. The time to do insert and select is the same. > The difference it no measurable because dominated by db IO. Anyway the > code is below and the output

[web2py] Re: partial csv import

2010-12-07 Thread mdipierro
That is not the problem. The problem is that you have a row that does not contain enough columns. Try open with excel, then export it again. On Dec 7, 1:10 pm, pftpft wrote: > Using the 'database administration', I am trying to import an Excel > generated CSV file (with lots of rows) into a tabl

Re: [web2py] Best way to populate GAE datastore?

2010-12-07 Thread Bruno Rocha
I do in model: usually "99_fixtures.py" my_dict_with_values = dict(field='value',anotherfield='anothervalue') if db(db.table).count() == 0: db.table.insert(**my_dict_with_values) 2010/12/7 Robert > I recently deployed an web2py application on GAE. The datastore was > empty at that

[web2py] partial csv import

2010-12-07 Thread pftpft
Using the 'database administration', I am trying to import an Excel generated CSV file (with lots of rows) into a table but it only imports in 15 rows at a time then gives the following flash message: unable to parse csv file list index out of range If I try to do a file with only 20 rows it work

[web2py] Best way to populate GAE datastore?

2010-12-07 Thread Robert
I recently deployed an web2py application on GAE. The datastore was empty at that point, and I couldn't add data through the Datastore Viewer since the tables/entities were not created yet. I now solved this by creating a form in web2py where I can manually populate the database with the initial

[web2py] Re: Is there a web2py IRC channel?

2010-12-07 Thread mdipierro
I have fixed in trunk. Will be fixed as pushed to stable. On Dec 7, 10:47 am, Robert wrote: > Awesome, thanks! :) > > Di Pierro might want to update the IRC info on the front page > (http://www.web2py.com/), the on free node seems way more active. > > On 7 dec, 15:04, Luther Goh Lu Feng wrote:

[web2py] Re: new dal

2010-12-07 Thread mdipierro
I run some benchmarks. The time to do insert and select is the same. The difference it no measurable because dominated by db IO. Anyway the code is below and the output is: old dal: 7.98740386963e-05 (sec) 0.00134269499779 new dal: 8.04572105408e-05 0.00139242005348 Notice all the time is in the

RE: [web2py] Re: Potential site trust abuse with default web2py setting?

2010-12-07 Thread Josh Jaques
I think I'd prefer to see the checking for external redirects in the redirect() function itself. Perhaps on a redirect() to an external page the user should be taken to a warning page that they are about to exit the web2py site, and ask them if they're sure they want to continue. This could be

[web2py] Re: new dal

2010-12-07 Thread mdipierro
fixed in trunk On Dec 7, 11:06 am, ron_m wrote: > Perfect now except this ticket as far as my app is concerned testing > against new dal > > Traceback (most recent call last): >   File "/home/camcentral/Dev/web2py_hg/gluon/restricted.py", line 188, > in restricted >     exec ccode in environment

[web2py] Re: Is there a web2py IRC channel?

2010-12-07 Thread Robert
Awesome, thanks! :) Di Pierro might want to update the IRC info on the front page (http:// www.web2py.com/), the on free node seems way more active. On 7 dec, 15:04, Luther Goh Lu Feng wrote: > Yes #web2py on freenode > > http://webchat.freenode.net/?channels=web2py > > On Dec 7, 7:42 pm, Robe

[web2py] Re: translation dict name

2010-12-07 Thread mdipierro
The language files are just python pickles of {'original':'translation',...} where original and translation are UTF8 strings. You can open, lock, unpickle, do whatever you need to do, re-pickle, unlock, close. On Dec 7, 11:03 am, Richard Vézina wrote: > Hello, > > I would like to update the diffe

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread mdipierro
Not sure I understand our comment: rows=db(...).select().sort(lambda row: random.random()) sorts the rows that have been already fetched at the web2py/python level. That is all. What is wrong with it? On Dec 7, 9:28 am, blackthorne wrote: > Seems to be 1.89.5 (2010-11-21 16:03:13).. > > but wh

[web2py] Re: new dal

2010-12-07 Thread ron_m
Perfect now except this ticket as far as my app is concerned testing against new dal Traceback (most recent call last): File "/home/camcentral/Dev/web2py_hg/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/camcentral/Dev/web2py_hg/applications/ccims/views

[web2py] translation dict name

2010-12-07 Thread Richard Vézina
Hello, I would like to update the different language file for certain entry with translation contained in database... So I would do something like that : fr-ca.py dict.update(translate_ui_tables_names) or fr-fr.py dict.update(translate_ui_tables_names) But I don't know the name of the the varia

[web2py] ajax search "select" field using crud or sqlform

2010-12-07 Thread Ole Martin Maeland
Hi, I would like to create a form were I get a dropdown list that search 3 rows in one table. it should then pick the .id field for the record. It would be similar to the ajax search with autocomplete: http://web2pyslices.com/main/slices/take_slice/51 I could use that, but how do I "embed" it in

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread blackthorne
Seems to be 1.89.5 (2010-11-21 16:03:13).. but what about my comment of the random sorting? On Dec 7, 3:09 pm, mdipierro wrote: > You have an old version. aidr is a type fixed some time ago. > > On Dec 7, 7:13 am, blackthorne wrote: > > > > > I don't see howcome this works as random sorting. >

[web2py] Re: Deployment of web2py on an intranet

2010-12-07 Thread mdipierro
When you start web2py you need to specify the IP address web2py.py -i 192.168.0.1 -p 8000 -a 'password' On Dec 7, 5:28 am, Rupesh Pradhan wrote: > I have two computers networked together using LAN cable with name > 'server'(192.168.0.1) and 'machine01'(192.168.0.2) > > I have installed web2py on

[web2py] Re: Error in "Cooperation" in the online book...

2010-12-07 Thread mdipierro
Applications can import each other's modules [using the syntax] the part in [..] should be removed. refers to this: local_import(...) On Dec 7, 8:36 am, GoldenTiger wrote: > yes, that's seems > I am about editing the book > Massimo, what did you wanted to write in that line? > > On 7 dic, 11

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread mdipierro
You have an old version. aidr is a type fixed some time ago. On Dec 7, 7:13 am, blackthorne wrote: > I don't see howcome this works as random sorting. > The only random thing I see it's the row chosen for sorting which will > only change the sorting criteria for the number of rows in the table. >

[web2py] Re: new dal

2010-12-07 Thread mdipierro
fixed. sorry. On Dec 7, 2:23 am, ron_m wrote: > New problem with latest hg pull, update. After filling login form and > submit get a ticket during the insert into auth_event different cause > than before. > > The def insert at line 3610 is building a new_fields list but the > db._adapter.insert()

[web2py] Re: Deployment of web2py on an intranet

2010-12-07 Thread Luther Goh Lu Feng
What are the network interfaces and their ip addresses on 'server'? On Dec 7, 10:29 pm, rochacbruno wrote: > Firewall ? > > Are you using Windows? Windows firewall is enabled? > > Enviado via iPhone > > Em 07/12/2010, às 09:28, Rupesh Pradhan escreveu: > > > > > > > > > I have two computers netw

[web2py] Re: Error in "Cooperation" in the online book...

2010-12-07 Thread GoldenTiger
yes, that's seems I am about editing the book Massimo, what did you wanted to write in that line? On 7 dic, 11:31, encompass wrote: > http://web2py.com/book/default/chapter/04#Cooperation > # Applications can call each other's actions locally using > exec_environment as discussed above. > # Appli

Re: [web2py] Deployment of web2py on an intranet

2010-12-07 Thread rochacbruno
Firewall ? Are you using Windows? Windows firewall is enabled? Enviado via iPhone Em 07/12/2010, às 09:28, Rupesh Pradhan escreveu: > I have two computers networked together using LAN cable with name > 'server'(192.168.0.1) and 'machine01'(192.168.0.2) > > I have installed web2py on the 'serv

[web2py] Re: Is there a web2py IRC channel?

2010-12-07 Thread Luther Goh Lu Feng
Yes #web2py on freenode http://webchat.freenode.net/?channels=web2py On Dec 7, 7:42 pm, Robert wrote: > nt

[web2py] Is there a web2py IRC channel?

2010-12-07 Thread Robert
nt

[web2py] Deployment of web2py on an intranet

2010-12-07 Thread Rupesh Pradhan
I have two computers networked together using LAN cable with name 'server'(192.168.0.1) and 'machine01'(192.168.0.2) I have installed web2py on the 'server'. After running the 'web2py_no_console' on the server (the http://localhost:8000 shows the welcome page), I tried to access the webpage throug

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread blackthorne
I don't see howcome this works as random sorting. The only random thing I see it's the row chosen for sorting which will only change the sorting criteria for the number of rows in the table. Am I wrong? P.S.: I couldn't make a quick test because: isco-Ribeiros-MacBook-Pro-2:web2py blackthorne$ py

[web2py] Off Topic: HTML5 webapps with Google Closure, Clojure and NoSQL db's

2010-12-07 Thread Tom Atkins
Interesting way of doing things for web apps: http://www.hackers-with-attitude.com/2010/10/using-clojure-nosql-databases-and.html May have some relevance to web2py with the new support for NoSQL db's - I like the idea of auto data sync between client (local storage API) and server (NoSQL key valu

[web2py] Error in "Cooperation" in the online book...

2010-12-07 Thread encompass
http://web2py.com/book/default/chapter/04#Cooperation # Applications can call each other's actions locally using exec_environment as discussed above. # Applications can import each other's modules using the syntax: # Applications can import any module in the PYTHONPATH search path, sys.path. Notice

[web2py] Re: new dal

2010-12-07 Thread Vidul
(changeset: 1322:a4378725f3cb): db.tester.insert(name='name') sql.pyc in insert(self, **fields) 3619 elif field.required: 3620 raise SyntaxError,'Table: missing required field: %s'%field -> 3621 return self._db._adapter.insert(self, new_fields) 3622

[web2py] Re: couchdb anybody?

2010-12-07 Thread Vidul
I am getting the following error on localhost after the latest update (changeset: 1322:a4378725f3cb): db.tester.insert(name='name') sql.pyc in insert(self, **fields) 3619 elif field.required: 3620 raise SyntaxError,'Table: missing required field: %s'%field -> 362

[web2py] Re: new dal

2010-12-07 Thread ron_m
New problem with latest hg pull, update. After filling login form and submit get a ticket during the insert into auth_event different cause than before. The def insert at line 3610 is building a new_fields list but the db._adapter.insert() called on the return statement at 3621 is expecting a dic

[web2py] Re: orderby='' on Google App Engine

2010-12-07 Thread cjrh
On Dec 7, 1:16 am, Albert Abril wrote: > I didn't know i could use imports in GAE > Thank you Massimo. Book updated to reflect Massimo's answer. I thought it best to emphasize the technique of using imports in these situations.