[web2py:18443] security concern regarding delete record

2009-03-22 Thread vince
if i have this if have_delete_access: form=SQLFORM(db.mytable,thisrecord,deletable=True) else: form=SQLFORM(db.mytable,thisrecord,deletable=False) form accept and etc is that secure? what if user make up their own form post? -vince --~--~-~--~~~---~--~~

[web2py:18444] store multiple records in storage and commit all at once

2009-03-22 Thread phneoix
hi, i would like to know whether it is possible to store multiple records in storage and commit them all at once to the table. if not is there any other way. thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[web2py:18445] Re: New record too long

2009-03-22 Thread Alexei Vinidiktov
22 марта 2009 г. 1:45 пользователь Yarko Tymciurak написал: > 2009/3/21 Alexei Vinidiktov >> >> The thing is the project that I'm intending to use web2py for is a web >> application for language learners, and I need to be sure that as many >> languages as possible are correctly treated by the ap

[web2py:18446] Registration email on GAE

2009-03-22 Thread murray3
I have been working on an app which has auth working fine. I can register and recieve the reg email etc. I am transferring it to GAE SDK, site seems to work ok. The registration email process does not work?? Anyone have an idea, been through this problem before? any help appreciated. Regards Ch

[web2py:18447] Re: How to hide the console window?

2009-03-22 Thread Iceberg
Hi Boris, Thanks for the hint. I managed to use hstart to execute "web2py.exe -a blah -t", so it can basically satisfied my need. However, because hstart is not fully "free" (please refer to http://www.ntwind.com/software/utilities/hstart/distribution.html ), so I still believe if web2py.exe ha

[web2py:18448] Re: (possibly weird) Questions for web2py

2009-03-22 Thread mdipierro
The only relevant files gluon/main.py (wsgibase) gluon/rewrite.py Are you planning to modify the routes_in syntax to allow REST? If so I am interested in it but let's agree on a syntax first. Massimo On Mar 21, 4:13 pm, Alex Popescu wrote: > Yarko, Massimo, > > I do understand how web2py rout

[web2py:18449] Re: boolean display

2009-03-22 Thread mdipierro
You should do this in forms only. So db.mytable.myfield.requires=IS_IN_SET(['option 1', 'option 2']) On Mar 21, 10:07 pm, Jeffield wrote: > ahh that is cool > How can I display a string field as a selectbox in a SQLTABLE? > i.e:http://www.w3schools.com/html/tryit.asp?filename=tryhtml_se

[web2py:18450] Re: security concern regarding delete record

2009-03-22 Thread mdipierro
would do: form=SQLFORM(db.mytable,thisrecord,deletable=have_delete_access) Auth + Curd also understand the following convention: auth=Auth(gloabls(),db) auth.define_tables() crud=Crud(globals(),db) crud.settings.auth=auth if auth.is_logged_in(): auth.add_permission(auth.id_group (auth.user.

[web2py:18451] Re: store multiple records in storage and commit all at once

2009-03-22 Thread mdipierro
You have to loop and commit each of them. On Mar 22, 6:14 am, phneoix wrote: > hi, >   i would like to know whether it is possible to store multiple > records in storage and commit them all at once to the table. if not is > there any other way. > > thanks --~--~-~--~~~---

[web2py:18452] Re: Registration email on GAE

2009-03-22 Thread mdipierro
I use it and it works fine but Google is more picky about smtp. Are you using gmail? On Mar 22, 7:21 am, murray3 wrote: > I have been working on an app which has auth working fine. > I can register and recieve the reg email etc. > > I am transferring it to GAE SDK, site seems to work ok. > The r

[web2py:18453] Re: How to hide the console window?

2009-03-22 Thread mdipierro
try web2py -a blah -p 8000 Not sure. On Mar 21, 10:44 pm, Iceberg wrote: > Hi pals, > > I am using web2py 's windows distribution. Is there some way to hide > the console window (a.k.a. the black dos window) in which web2py is > running?  I already know about: >   web2py.exe -a blah -t > can s

[web2py:18454] Re: Authentication related question

2009-03-22 Thread notabene
Hi Massimo Thank You for Your great work. I have the impression that You are a "one-man army", that design, develop, make documentation, teach and support. But (always a but?) if I may suggest an improvement: When You get these questions. Why not refer to the best available documentation? In thi

[web2py:18455] Re: store multiple records in storage and commit all at once

2009-03-22 Thread notabene
Or run db.executesql('Insert into ')? On Mar 22, 4:04 pm, mdipierro wrote: > You have to loop and commit each of them. > > On Mar 22, 6:14 am, phneoix wrote: > > > hi, > >   i would like to know whether it is possible to store multiple > > records in storage and commit them all at once to t

[web2py:18456] Re: store multiple records in storage and commit all at once

2009-03-22 Thread notabene
Or rather: db.executesql('START TRANSACTION;') db.executesql('Insert into ;') db.commit() On Mar 22, 4:42 pm, notabene wrote: > Or run db.executesql('Insert into ')? > > On Mar 22, 4:04 pm, mdipierro wrote: > > > You have to loop and commit each of them. > > > On Mar 22, 6:14 am, phneoi

[web2py:18457] Re: How to hide the console window?

2009-03-22 Thread Iceberg
Tried but that does not help. :-P We need something similar to the effect of hstart.exe's: hstart /NOCONSOLE "web2py.exe -i 0.0.0.0 -a -t" On Mar22, 11:06pm, mdipierro wrote: > try > > web2py -a blah -p 8000 > > Not sure. > > On Mar 21, 10:44 pm, Iceberg wrote: > > > Hi pals, > > > I am

[web2py:18458] Re: Feature Request: DECIMAL or NUMERIC type for database fields

2009-03-22 Thread Paco
All right, I knew about the implied decimal point solution but it won allow you to handle very big numbers. I made a quick check and only SQLite doesn't support DECIMAL types. Maybe is worth the effort to make DAL support, for the sake of simplicity, a MONEY type and make DAL to 'internaly' sup

[web2py:18459] Re: Authentication related question

2009-03-22 Thread Jason Brower
+1 for Niels. Massimo, your too good a guy to help us. :P I am sure you know people in this. There are people all around the world ready to help you out. I wish I knew more, then I would help. But I am sure I can do something in the documentation. Don't be scared to ask people for help. :D Reg

[web2py:18460] User Report: Me

2009-03-22 Thread Kent Borg
Datapoint: I have been studying and playing with web2py for several weeks now. Attractions: - Python. - Appeared to be simple. - Claimed to scale. First reactions: - I think I finally understand list comprehensions! (Spending a lot of time trying to understand how to write pythonic c

[web2py:18461] Re: Registration email on GAE

2009-03-22 Thread murray3
Massimo, yes I am using gmail smtp and gmail account to send! Chrism On Mar 22, 3:05 pm, mdipierro wrote: > I use it and it works fine but Google is more picky about smtp. Are > you using gmail? > > On Mar 22, 7:21 am, murray3 wrote: > > > I have been working on an app which has auth working fi

[web2py:18462] auth questions

2009-03-22 Thread ctalley
1. There doesn't seem to be any provision for setting password policy (length, character mix) and enforcing it at the time a user registers. As currently implemented, a user can enter anything - or nothing - for a password. Something as simple as IS_NOT_EMPTY and a minimum length would help a lo

[web2py:18463] registration behavior

2009-03-22 Thread ctalley
Registration (http:///[app]/default/user/register) behaves differently depending on whether a user is logged in or not logged in. If logged in: a prepopulated form with first name, last name, and e- mail of the logged-in user. If not logged in: an empty form with first name, last name, e-mai

[web2py:18464] Re: store multiple records in storage and commit all at once

2009-03-22 Thread mdipierro
Actions are already wrapped in a transaction so this is not necessary. If the page issues a ticket, the transaction is rolled back. Massimo On Mar 22, 10:46 am, notabene wrote: > Or rather: > db.executesql('START TRANSACTION;') > db.executesql('Insert into ;') > db.commit() > > On Mar 22, 4

[web2py:18465] Re: Feature Request: DECIMAL or NUMERIC type for database fields

2009-03-22 Thread mdipierro
Another possibility: Make the field 'string' and try this class IS_DECIMAL: def __init__(self,decimals=2,error_message="Invalid"): self.decimals=decimals self.error_message=error_message def __call__(self,value): import re if re.compile('\d+(\.\d{1,%s})?'%sel

[web2py:18466] Re: (possibly weird) Questions for web2py

2009-03-22 Thread Alex Popescu
On Mar 22, 4:57 pm, mdipierro wrote: > The only relevant files > > gluon/main.py (wsgibase) > gluon/rewrite.py > I think that gluon/html.py URL will also need some changes for the case when it is used with a request parameter. > Are you planning to modify the routes_in syntax to allow REST? If

[web2py:18467] Re: Authentication related question

2009-03-22 Thread mdipierro
:-) yes, it is great to have so many competent people on this list! Massimo On Mar 22, 12:59 pm, Jason Brower wrote: > +1 for Niels. > Massimo, your too good a guy to help us. :P  I am sure you know people > in this.  There are people all around the world ready to help you out. > I wish I knew

[web2py:18468] sqlite - multiple foreign key refs to one table

2009-03-22 Thread ctalley
No doubt this is off topic ... I'm pretty sure it's an issue with sqlite not web2py. But maybe someone's run into it before so I guess it doesn't hurt to ask. I'm using sqlite bundled with web2py. I have a "Team" table (each record has name, phone, e-mail, ...), and a "DocReview" table with thr

[web2py:18469] Re: Registration email on GAE

2009-03-22 Thread mdipierro
The only thing I think of is that gmail smtp requires that the sendto address is the gmail email account. Massimo On Mar 22, 2:49 pm, murray3 wrote: > Massimo, > yes I am using gmail smtp and gmail account to send! > Chrism > > On Mar 22, 3:05 pm, mdipierro wrote: > > > > > > > I use it and it

[web2py:18471] Re: (possibly weird) Questions for web2py

2009-03-22 Thread mdipierro
This is a complex issue and I am on vacation with limited connectivity. Can we postpone this discussion to April? Massimo On Mar 22, 4:04 pm, Alex Popescu wrote: > On Mar 22, 4:57 pm, mdipierro wrote: > > > The only relevant files > > > gluon/main.py (wsgibase) > > gluon/rewrite.py > > I think

[web2py:18472] Re: auth questions

2009-03-22 Thread mdipierro
On Mar 22, 3:09 pm, ctalley wrote: > 1. There doesn't seem to be any provision for setting password policy > (length, character mix) and enforcing it at the time a user > registers.  As currently implemented, a user can enter anything - or > nothing - for a password.  Something as simple as IS_NO

[web2py:18473] Re: registration behavior

2009-03-22 Thread mdipierro
You can just do this: def register_new_user(): form=SQLFORM(db.auth_user) if form_accepts(request.vars, session): auth.add_group('user_%s' ^ form.vars.id) ## a group for this user, you can add others. session.flash="new user registered" redirect('index') return

[web2py:18470] Re: sqlite - multiple foreign key refs to one table

2009-03-22 Thread mdipierro
probably your DocReview ehere not Submitted by and AssignedTo or Completed by the same person. I think you need a left join and table renaming: submit_team=db.Team.with_alias('submit_team') assign_team=db.Team.with_alias('assign_team') complete_team=db.Team.with_alias('complete_team') rows=db().

[web2py:18474] Detect already running web2py

2009-03-22 Thread Iceberg
Hi Massimo, At least in Windows platform, when one "web2py -i 0.0.0.0 -p 8000" process in running, I noticed that local administrator can still start another "web2py -i 0.0.0.0 -p 8000" process without any error message, but of course the second web2py process can not accept any request. So I sug

[web2py:18475] Re: Detect already running web2py

2009-03-22 Thread mdipierro
I like the idea and I will add it asap. Thanks. Massimo On Mar 22, 8:50 pm, Iceberg wrote: > Hi Massimo, > > At least in Windows platform, when one "web2py -i 0.0.0.0 -p 8000" > process in running, I noticed that local administrator can still start > another "web2py -i 0.0.0.0 -p 8000" process

[web2py:18476] Re: (possibly weird) Questions for web2py

2009-03-22 Thread Alex Popescu
On Mar 22, 11:17 pm, mdipierro wrote: > This is a complex issue and I am on vacation with limited > connectivity. Can we postpone this discussion to April? > Ok. I'll continue with the other framework on my list and get back to the topic in April. cheers, ./alex -- .w( the_mindstorm )p. Alex

[web2py:18477] Re: auth questions

2009-03-22 Thread ctalley
OK, I think I understand auth_permission better now. I was looking at the form at ...appadmin/insert/db/auth_permission, with the following fields: 1. Group Id: 2. Name: 3. Table Name: 4. Record Id: Looking at the parameters (from your reply) in auth.add_permission (group_id,'update',db.mytable

[web2py:18478] Full documentation

2009-03-22 Thread Álvaro Justen [Turicas]
Hello, firstly, congratulations for the job in web2py, Massimo! I downloaded and printed web2py's manual and only when I was reading I see that it was incomplete. That is a reason for doesn't exist a free full documentation? Free documentation is very good, but I want to learn more advanced featu

[web2py:18479] Re: New record too long

2009-03-22 Thread Yarko Tymciurak
2009/3/21 AchipA > > Oops, wrong copypaste, here is the correct one: > > In [1]: validator = IS_LENGTH(1) > > In [2]: validator('a') > Out[2]: ('a', None) > > In [3]: validator('aa') > Out[3]: ('aa', 'too long!') > > In [4]: validator('á') > Out[4]: ('\xc3\xa1', 'too long!') > > In [5]: validator