[web2py:23408] Documentation issue with Services

2009-06-06 Thread David Watson
Hi, in the services section on this page: http://www.web2py.com/examples/default/tools I believe the intent of the example is actually something closer to the following: def myfunction(a,b): return int(a)+int(b) As it stands, when called with the parameters encoded as demonstrated: http:/

[web2py:23409] Re: RIAs, services and authentication

2009-06-06 Thread Alexei Vinidiktov
Thanks for your reply, desfrenes. Could you share how you generate your tokens? Do they expire or are they permanent for each user? Do token identify sessions or users? Thanks. On Fri, Jun 5, 2009 at 6:01 PM, desfrenes wrote: > > I use a token auth handle at the service level. It has disadvant

[web2py:23410] Re: RIAs, services and authentication

2009-06-06 Thread desfrenes
Tokens identify users, not sessions since your services should be stateless anyway (each call to a service method should be independent and should not require a call to another method. Read about it here: http://searchsoa.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid26_gci826428,00.html).

[web2py:23411] JPoLite and request.args

2009-06-06 Thread murray3
Is there anything special that needs to be done to pass args from a view module to a controller. I ask as the standard code that works on a "typical" view and controller does not work when used in jpolite: In view module m201: {{for prodj in prodj

[web2py:23412] Re: RIAs, services and authentication

2009-06-06 Thread Alexei Vinidiktov
Thanks a lot for the information, desfrenes! It's just what I needed. I'm new to web programming (been developing desktop software for a while mostly in C++) and have to do many things for the first time. Now I'm going to try and experiment with this stuff. I wish server-side token generation a

[web2py:23413] Re: RIAs, services and authentication

2009-06-06 Thread desfrenes
On Jun 6, 12:09 pm, Alexei Vinidiktov wrote: > I wish server-side token generation and handling would be implemented > in web2py proper. I'm not sure there can be a generic response to this since the nature of both the token and the token store can be different from one project to another. The

[web2py:23414] Registration in web2py version 1.63

2009-06-06 Thread pk
Hi together, I´ve a question. I´m using the auth()-Object and when the user try to register himself he got a E-Mail to verify his E-Mail adress. I loaded today the new web2py version 1.63 and I try to register a new user, but I don`t get a verification E-Mail. Do you know what the problem can be?

[web2py:23415] old version

2009-06-06 Thread pk
Hi together, where can I find the previous version of web2py (version before 1.63) ? thanks Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web

[web2py:23416] Problem with the new version

2009-06-06 Thread pk
Hi, i use the auth()-Object and in my default controler i used for example this code: @auth.requires_login() def index(): redirect(URL(r=request,c='menu',f='index')) but for the first time, when the youser loged in succesful, he gets the http://127.0.0.1:8000/admin/default/site only at fir

[web2py:23417] Re: SQLFORM rendering

2009-06-06 Thread HansD
example updated On 5 jun, 22:22, mdipierro wrote: > I emailed it to you > > On Jun 5, 3:01 pm, Hans Donner wrote: > > > yes, master :-) > > > i noticed there needs to be secuirty code entered > > what must this be? > > > On Fri, Jun 5, 2009 at 8:52 PM, mdipierro wrote: > > > > Can you pleas

[web2py:23418] Re: 1.63.1 issues.

2009-06-06 Thread annet
Massimo, I updated to 1.63.5 and got the updates from r992, but that did not solve my first problem: > auth.settings.login_url=URL(r=request,c='authentication',f='login') > auth.settings.login_next=URL(r=request,c='core',f='index') > auth.settings.logout_next=URL(r=request,c='default',f='index')

[web2py:23419] Re: 1.63.1 issues.

2009-06-06 Thread annet
Massimo, I updated to 1.63.5 and got the updates from r992, but that did not solve my first problem: > auth.settings.login_url=URL(r=request,c='authentication',f='login') > auth.settings.login_next=URL(r=request,c='core',f='index') > auth.settings.logout_next=URL(r=request,c='default',f='index')

[web2py:23420] Re: old version

2009-06-06 Thread Mariano Mara
2009/6/6 pk > > Hi together, > > where can I find the previous version of web2py (version before > 1.63) ? > thanks > Peter > If you're using the bzr repository you can download the current version and then branch to a previous one: $ bzr help branch Purpose: Create a new copy of a branch. Usag

[web2py:23423] Re: learning python

2009-06-06 Thread mdipierro
I agree. I will take a patch to this effect/ I would not spend time with sql.py since I am rewriting it from scratch. On Jun 6, 12:39 am, Hans Donner wrote: > Thanks all. > I'm noot looking for a central place to store it all, or for real > inmutable constants. > > For the example given: > > cla

[web2py:23425] Re: Documentation issue with Services

2009-06-06 Thread mdipierro
oops On Jun 5, 11:53 pm, David Watson wrote: > Hi, in the services section on this page: > > http://www.web2py.com/examples/default/tools > > I believe the intent of the example is actually something closer to > the following: > > def myfunction(a,b): >     return int(a)+int(b) > > As it stands,

[web2py:23424] Re: web2py perfomance

2009-06-06 Thread mdipierro
interesting. Perhaps this could default in new dal. On Jun 6, 1:14 am, Alexey Nezhdanov wrote: > Switched to lazy table definitions. > Model init time was cut down to 0.046s. > Some of excess time is eliminated, some (my guess is 30%) is moved into > controller execution. At any rate - this is f

[web2py:23426] Re: Delete error on crud

2009-06-06 Thread Fran
On 6 June, 03:37, Tito Garrido wrote: > _border=1,_class='sortable',_id='searchable',linkto=URL(r=request,f='data/update')) Try: URL(r=request, f='data', args='update') F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[web2py:23422] Re: Registration in web2py version 1.63

2009-06-06 Thread Fran
On 6 June, 11:25, pk wrote: > I´ve a question. I´m using the auth()-Object and when the user try to > register himself he got a E-Mail to verify his E-Mail adress. I loaded > today the new web2py version 1.63 and I try to register a new user, > but I don`t get a verification E-Mail. Do you know w

[web2py:23428] Re: Problem with the new version

2009-06-06 Thread mdipierro
which web2py version? what would you excpect exactly? I am confused by the url names. On Jun 6, 7:05 am, pk wrote: > Hi, > > i use the auth()-Object and in my default controler i used for example > this code: > > @auth.requires_login() > def index(): >     redirect(URL(r=request,c='menu',f='ind

[web2py:23427] Re: RIAs, services and authentication

2009-06-06 Thread mdipierro
if sessions are enabled web2py services will return the session cookie (as for regular pages), if you return that as a cookie it will authenticate the user without passin credentials again. There is no other mechanism. On Jun 6, 5:21 am, desfrenes wrote: > On Jun 6, 12:09 pm, Alexei Vinidiktov

[web2py:23429] Re: custom form using Auth

2009-06-06 Thread Fran
On 5 June, 16:29, Bill wrote: >        self.messages.logged_in = T("Logged in") In recent versions of Web2Py, you no longer need to call T explicitly for messages. They are automatically Internationalised via the new Messages() type :) F --~--~-~--~~~---~--~~ You

[web2py:23430] Re: 1.63.1 issues.

2009-06-06 Thread mdipierro
one is a bug. The behaviour issue I am not sure. Will fix these tonight. On Jun 6, 8:43 am, annet wrote: > Massimo, > > I updated to 1.63.5 and got the updates from r992, but that did not > solve my first problem: > > > auth.settings.login_url=URL(r=request,c='authentication',f='login') > > auth

[web2py:23431] Re: custom form using Auth

2009-06-06 Thread Fran
On 5 June, 16:29, Bill wrote: > auth2.settings.table_user = db.define_table( >         self.settings.table_user_name, I don't think you can use 'self' here. Needs to be: auth2.settings.table_user_name > '%s.email' % self.settings.table_user._tablename)] Likewise: auth2.settings.table_user._tab

[web2py:23432] Re: Proper SQLite Unicode Case-Folding finally solved

2009-06-06 Thread mdipierro
Probably yes, thanks Markus. Any objection? On Jun 6, 9:25 am, Markus Gritsch wrote: > Hi, > > vanilla SQLite supports a case insensitive LIKE statement only for > ASCII characters.  So the following works >   SELECT 'a' LIKE 'A' >     -> 1 > but for characters outside the ASCII range the LIKE s

[web2py:23434] Re: how to override Auth

2009-06-06 Thread Fran
On 4 June, 19:09, "Sebastian E. Ovide" wrote: > class MyAuth(Auth): Add here: def __init__(self, environment, db = None): Auth.__init__(self, environment, db) F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[web2py:23433] Re: Registration in web2py version 1.63

2009-06-06 Thread mdipierro
haha... this is missing in the slides. I should add it. On Jun 6, 9:27 am, Fran wrote: > On 6 June, 11:25, pk wrote: > > > I´ve a question. I´m using the auth()-Object and when the user try to > > register himself he got a E-Mail to verify his E-Mail adress. I loaded > > today the new web2py ve

[web2py:23435] Re: web2py perfomance

2009-06-06 Thread DenesL
Very interesting. How about creating a test case app that people could run to report performance results on different platforms and CPUs?. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group.

[web2py:23436] slides again

2009-06-06 Thread mdipierro
I posted a new version of the slides with typos fixed, and a couples slides added. http://www.scribd.com/doc/16085263/web2py-slides-version-163 BTW 3000 viewers so far (the first 900 are not counted by scribd.com because the doc was not hosted there originally when posted). Massimo --~--~--

[web2py:23437] Re: web2py perfomance

2009-06-06 Thread mdipierro
I think it is a great idea. Anyway, I would like to remind people the following web2py command line option: -F PROFILER_FILENAME, --profiler=PROFILER_FILENAME profiler filename Massimo On Jun 6, 10:17 am, DenesL wrote: > Very interesting. > How about creating a test

[web2py:23438] Re: Problem with the new version

2009-06-06 Thread pk
ok, the new version is 1.63.5 which i`ve got problems. the version i used before was 1.61.4 if login is correct i should get http://127.0.0.1:8000/2busy/menu/index but in the new version only at first login i come to this link http://127.0.0.1:8000/admin/default/site also i`ve got problems with

[web2py:23439] Re: RIAs, services and authentication

2009-06-06 Thread desfrenes
That's another way and quite possibly the most standard one, but still this seams to be a problem in some cases. afaik, actionscript 3 has native no support for cookies, that mean flex appmications won't use them, although AIR applications will (yes, this is crazy). Anyway this is a general web s

[web2py:23441] Re: Problem with the new version

2009-06-06 Thread mdipierro
found the problem. somebody also submited a ticket (perhaps you). fixing now. a typo was introduced in the trunk version. Massimo On Jun 6, 10:57 am, pk wrote: > ok, the new version is 1.63.5 which i`ve got problems. > the version i used before was 1.61.4 > > if login is correct i should gethtt

[web2py:23442] Re: Registration in web2py version 1.63

2009-06-06 Thread pk
ok thanks for your help. dear peter On 6 Jun., 16:56, mdipierro wrote: > haha... this is missing in the slides. I should add it. > > On Jun 6, 9:27 am, Fran wrote: > > > On 6 June, 11:25, pk wrote: > > > > I´ve a question. I´m using the auth()-Object and when the user try to > > > register him

[web2py:23443] Re: experimental: decimal and pickable and custom columns

2009-06-06 Thread mdipierro
I think this is now fixed but I have not tried. Can you please try it? On Jun 5, 12:49 pm, Hans Donner wrote: > appreciate that, still learning python so I'm looking forward what I > can learn from your fix. > > On Thu, Jun 4, 2009 at 11:16 PM, mdipierro wrote: > > > I know what to do. I will fi

[web2py:23444] Re: Problem with the new version

2009-06-06 Thread pk
ok thanks, and what can i do now? is this a problem of my code? thanks On 6 Jun., 18:04, mdipierro wrote: > found the problem. somebody also submited a ticket (perhaps you). > fixing now. a typo was introduced in the trunk version. > > Massimo > > On Jun 6, 10:57 am, pk wrote: > > > ok, the ne

[web2py:23445] Re: custom form using Auth

2009-06-06 Thread Bill
Fran, Thanks for your reply and assistance. When I saw your message to Sebastian's post (http://groups.google.com/group/web2py/browse_thread/ thread/94abde666464f079?hl=en), I realized that there still must be a learning curve associated with Auth. I'm using the windows version. Last night I fin

[web2py:23446] Re: 1.63.1 issues.

2009-06-06 Thread annet
Massimo, I have a look at those fixes first thing in the morning. I found two more functions that worked in version 1.61.4 but no longer do in 1.63.5 In a custom controller I have: def retrieve_username(): response.functionname= T('Retrieve username') return dict(form=auth.retrieve_us

[web2py:23440] Re: old version

2009-06-06 Thread pk
thanks for your help greets peter On 6 Jun., 15:43, Mariano Mara wrote: > 2009/6/6 pk > > > > > Hi together, > > > where can I find the previous version of web2py (version before > > 1.63) ? > > thanks > > Peter > > If you're using the bzr repository you can download the current version and > t

[web2py:23447] Re: 1.63.1 issues.

2009-06-06 Thread annet
Massimo, I resolved the behaviour issue myself. I provided the group_id instead of the role, I changed the group_id to role and now it works as it did before. I have no idea why group_id did not work. Best regards, Annet. --~--~-~--~~~---~--~~ You received thi

[web2py:23448] Re: Delete error on crud

2009-06-06 Thread Tito Garrido
Same error... On Sat, Jun 6, 2009 at 11:45 AM, Fran wrote: > > On 6 June, 03:37, Tito Garrido wrote: > > > _border=1,_class='sortable',_id='searchable',linkto=URL(r=request,f='data/update')) > > Try: > URL(r=request, f='data', args='update') > > F > > > -- Linux User #387870 . .

[web2py:23449] Re: Delete error on crud

2009-06-06 Thread mdipierro
are you setting onvalidation=something in your code? what's something? On Jun 6, 11:43 am, Tito Garrido wrote: > Same error... > > On Sat, Jun 6, 2009 at 11:45 AM, Fran wrote: > > > On 6 June, 03:37, Tito Garrido wrote: > > > _border=1,_class='sortable',_id='searchable',linkto=URL(r=request,f=

[web2py:23450] Re: Delete error on crud

2009-06-06 Thread annet
Tito, I am facing the same problem: In version 1.61.4 all my update functions worked, in version 1.63.5 the update works but the check to delete functionality doesn't, it issues a ticket: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/web2py_1_63_5/gluon/ restricte

[web2py:23451] Re: Concerning sqlite3 vs. pysqlite2

2009-06-06 Thread Markus Gritsch
On Fri, Jun 5, 2009 at 9:29 PM, Markus Gritsch wrote: > Line 55 of sql.py contains a typo in the string: > >        logging.debug('no sqlite3 or mysqlite2.dbapi2 driver') > > mysqlite2 -> pysqlite2 > > Kind regards, > Markus The typo ist still there -- just reminding :) Markus --~--~-~-

[web2py:23452] Re: Delete error on crud

2009-06-06 Thread Tito Garrido
Thanks for you feedback Annet. No I'm not setting any "onvalidation" code... I'm using /data/update from crud. Regards, Tito On Sat, Jun 6, 2009 at 1:46 PM, annet wrote: > > Tito, > > I am facing the same problem: > > In version 1.61.4 all my update functions worked, in version 1.63.5 > the u

[web2py:23453] Re: experimental: decimal and pickable and custom columns

2009-06-06 Thread Hans Donner
consider it fixed. On Sat, Jun 6, 2009 at 6:07 PM, mdipierro wrote: > > I think this is now fixed but I have not tried. Can you please try it? > > On Jun 5, 12:49 pm, Hans Donner wrote: >> appreciate that, still learning python so I'm looking forward what I >> can learn from your fix. >> >> On T

[web2py:23454] Index Error on GAE

2009-06-06 Thread Tito Garrido
Hi Folks, I've been receiving Index Errors when I try to run my web2py on gae application: 1. 189.115.246.131 - - [06/Jun/2009:11:37:39 -0700] "GET / HTTP/1.1" 500 251 "http://appengine.google.com/deployment?&app_id=tito-garrido&version_id=1.330233729128519238"; "Mozilla/5.0 (Windows; U;

[web2py:23455] Re: Index Error on GAE

2009-06-06 Thread Hans Donner
running locally works fine? did you check index.yaml? On Sat, Jun 6, 2009 at 8:41 PM, Tito Garrido wrote: > Hi Folks, > > I've been receiving Index Errors when I try to run my web2py on gae > application: > > 189.115.246.131 - - [06/Jun/2009:11:37:39 -0700] "GET / HTTP/1.1" 500 251 > "http://appe

[web2py:23456] Re: web2py perfomance

2009-06-06 Thread vihang
Very interesting mod. @Massimo, as mentioned about the requires statement, is there a way to address the following directly in the field definition? db.some_table.field1.requires = IS_NOT_IN_DB(db,db.some_table.field1) On Jun 6, 7:51 pm, mdipierro wrote: > I think it is a great idea. > , > Any

[web2py:23457] Re: web2py perfomance

2009-06-06 Thread Hans Donner
yep, add requires=IS_NOT_IN_DB(db,db.some_table.field1) in the SQField() statement as an argument On Sat, Jun 6, 2009 at 9:17 PM, vihang wrote: > > Very interesting mod. > > @Massimo, as mentioned about the requires statement, is there a way to > address the following directly in the field de

[web2py:23458] My first complicated sql statement....

2009-06-06 Thread Jason Brower
I have a big fat book on SQL syntax. But I am hoping on using Web2Py's python syntax. I want to make it so my users that have tags that are the same can be listed with the tag is the same between them. The user I am looking up is the logged in user, I am using the auth feature. Soo I have tag "

[web2py:23459] Informal Poll re use of admin interface

2009-06-06 Thread weheh
Actually, is there a formal polling place for posting web2py questions? My question is how many of you out there use the shell and emacs or vim to develop your web2py apps vs. using the built-in admin interface and editor? During db development I'll use the admin interface to inspect the db. But a

[web2py:23460] Re: Index Error on GAE

2009-06-06 Thread Robin B
The easiest way to fix this is to exercise your app on the development server, (use the query that needs that missing index) which will add the missing index to the generated index.yaml. The next time you update/deploy your index.yaml to production, GAE will 'build' the new index which takes time

[web2py:23461] Re: Delete error on crud

2009-06-06 Thread mdipierro
Please email me or post minimal code and a description of the steps to reproduce the problem. On Jun 6, 11:46 am, annet wrote: > Tito, > > I am facing the same problem: > > In version 1.61.4 all my update functions worked, in version 1.63.5 > the update works but the check to delete functionalit

[web2py:23462] Re: My first complicated sql statement....

2009-06-06 Thread mdipierro
This should do it. current_user_id=... db((db.users.id==db.user_tags.user_id)&(db.user_tags.tag_id==db.tag.id) &(db.user_tags.tag_id.belongs(db (db.user_tags.user_id==current_user_id)._select (db.user_tags.tag_id.select (db.users.ALL,db.tag.ALL,groupby=db.users.id) Massimo On Jun 6, 2:54 pm

[web2py:23463] Re: Informal Poll re use of admin interface

2009-06-06 Thread mdipierro
I do not think we have a formal way for polling. I use shell and emacs most of the times just because I am used to emacs shortcuts. On Jun 6, 4:12 pm, weheh wrote: > Actually, is there a formal polling place for posting web2py > questions? My question is how many of you out there use the shell

[web2py:23464] Re: Informal Poll re use of admin interface

2009-06-06 Thread JohnMc
admin: db setup, quick updates like after a ticket where it was an obvious typo. dev: Usually bluefish occasionally nano. On Jun 6, 4:12 pm, weheh wrote: > Actually, is there a formal polling place for posting web2py > questions? My question is how many of you out there use the shell and > emacs

[web2py:23465] How to apply then rollback?

2009-06-06 Thread weheh
I'm doing the following: if form.accepts(request.vars,session,onvalidation=my_val): session.flash='success' redirect(URL(r=request,f='newpage')) elif form.errors: response.flash='error' I'm wondering if the data are committed to the

[web2py:23466] Re: How to apply then rollback?

2009-06-06 Thread mdipierro
accpets takes two arguments onvalidation=lambda form: None onaccept=lambda form: None onvalidation is run after validation before insert/update/delete onaccept is done after insert/update/delete before redirection It it technically possible to make onaccept point to a function that does some ch

[web2py:23467] about new DAL

2009-06-06 Thread DenesL
Massimo, in the new DAL, will this be possible?: dbX.define_table('dog',SQLField('name'),SQLField('owner',dbY.person)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this

[web2py:23468] parentheses in url gives Invalid Request

2009-06-06 Thread Brian Maddy
Hello, >From what I understand, web2py doesn't allow certain special characters in incoming urls because it's a possible security issue (found here: http://ru.ly/F8). I need to accept parentheses in my application and I really don't want to have to maintain a slightly different fork of web2py.

[web2py:23469] Re: How to apply then rollback?

2009-06-06 Thread weheh
Thanks, Massimo. I think I understand what I have to do, now. In the onvalidation script I have to retrieve the db and then add or modify the record that's represented by the form data. Then I can process the information to determine whether the form is to be accepted. It'll take a little doing, b

[web2py:23470] Re: web2py perfomance

2009-06-06 Thread mdipierro
Turns out the current DAL spends lots of time in building the SQL representation of a table (CREATE TABLE) even if the table does not need to be created. I will fix this and it will speed it up a lot without need for lazy evaluations. Massimo On Jun 6, 1:14 am, Alexey Nezhdanov wrote: > Switche

[web2py:23471] Re: about new DAL

2009-06-06 Thread mdipierro
you can do it now but with a different syntax dbX.define_table('dog',SQLField('name'),SQLField ('owner','integer',requires=IS_IN_DB(dbY,'person.id','%(name)s'))) On Jun 6, 7:33 pm, DenesL wrote: > Massimo, > in the new DAL, will this be possible?: > > dbX.define_table('dog',SQLField('name'),SQL

[web2py:23472] Re: parentheses in url gives Invalid Request

2009-06-06 Thread mdipierro
yes. If you give us an example of the URL we can show you the proper routes.py file. Massimo On Jun 6, 7:57 pm, Brian Maddy wrote: > Hello, > > From what I understand, web2py doesn't allow certain special > characters in incoming urls because it's a possible security issue > (found here:http://

[web2py:23473] Re: How to apply then rollback?

2009-06-06 Thread weheh
Proof of pudding complete. It works just fine. Thanks again, Massimo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsub

[web2py:23474] Re: How to apply then rollback?

2009-06-06 Thread weheh
Oh, and I should have said that the pudding tastes delicious. Yay web2py! ;^) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com

[web2py:23475] Re: Delete error on crud

2009-06-06 Thread annet
Massimo, In db.py I have: db.define_table('adres', db.Field('bedrijf',db.bedrijf,label='Bedrijf * ',default='',notnull=True,ondelete='CASCADE'), db.Field('adressoort',db.adressoort,label='Adressoort * ',default='',notnull=True,ondelete='RESTRICT'), db.Field('straat',label='Straat * '

[web2py:23476] Re: Informal Poll re use of admin interface

2009-06-06 Thread Rui Gomes
No one use eric IDE? I start to use because of pyQT after that i get addictive to it, really helpful PS: gonna be nice if some day show a plug-in to eric ide, like the one he have for django 8-) On Sat, Jun 6, 2009 at 10:26 PM, JohnMc wrote: > > admin: db setup, quick updates like after a ticket