[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-02-23 Thread Bruno Codeman

Massimo, please add my company:

Name: Sonne Tech
Website: www.sonnetech.com.br
Country: Brazil.

Thanks!

Em domingo, 15 de fevereiro de 2015 20:21:36 UTC-2, Massimo Di Pierro 
escreveu:
>
> We need to update the list of companies that provide web2py consulting.
> This list is obsolete:
>
> http://web2py.com/init/default/support
>
> Some links are broke. Most pages do not even mention web2py. Some of them 
> have a design that is simply not acceptable for a web development company.
>
> That list will be eliminated. IF YOU WANT TO BE LISTED please update your 
> page to have a decent design and MENTION WEB2PY on the main site. Then 
> respond to this thread by providing an updated link and the country were 
> you incorporated. If you have a self-employed individual list your country 
> of residence.
>
>

-- 
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 Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Manually send confirmation email

2012-10-03 Thread Bruno Codeman
Well, now I see: It's validating the auth data, but not the other's table 
date. Already tried set onvalidation parameter, but when I do it, it's 
saving the Empresa table data, but not creating the user. =/
Here's the methos
def user():
if request.args(0) == 'login':
response.view = 'default/login.html'
return dict(form = auth.login())
elif request.args(0) == 'register':
form = SQLFORM(db.empresas,formstyle = 'divs')
form.elements(_type='submit',replace=None)
form.components.append(auth.register(onvalidation = 
form.accepts(request,session),onaccept = 
Empresa.cadastrar(request.post_vars)).element())

response.view = 'empresa/cadastrar.html'

return dict(form=form)
else:
return dict(form = auth())


Em quinta-feira, 27 de setembro de 2012 19h59min04s UTC-3, howesc escreveu:
>
> you may be able to use the onaccept handler of auth.register() to add 
> custom processing to auth without too much extra work.  you can add extra 
> fields to the auth form, and then do custom processing and let auth do the 
> rest of the work.
>
> On Thursday, September 27, 2012 6:24:15 AM UTC-7, Bruno Codeman wrote:
>>
>> Massimo, grazie per rispondere. Actually, I'm not using auth.register, I 
>> have a table called company, which is the "main entity" in the system. In 
>> my form, I have the data from both tables (the user must type the company 
>> data and the user data - email, name and password - in the same form), so I 
>> created a new controller and I'm saving the company data first, then I'm 
>> saving user data. Here's the code:
>>
>> empresa_has_errors = 
>> db.empresa._validate(**db.empresa._filter_fields(args)).items()
>> usuario_has_errors = 
>> db.usuario._validate(**db.usuario._filter_fields(args)).items()
>> if not empresa_has_errors and not usuario_has_errors:
>> id = db.empresa.insert(**db.empresa._filter_fields(args))
>> db.usuario.insert(email = args.email, nome_completo = args.nome_completo,
>>   empresa = id,telefone = args.telefone,
>>   password = db.usuario.password.validate(args.password)[0])
>> else:
>> return dict(empresa = empresa_has_errors, usuario = usuario_has_errors)
>>
>> I want to keep this user as inactive until it clicks on the link send by 
>> email. My questions:
>>
>> 1) Is there a way to do it with the auth email?
>>
>> 2) Should I create a custom form with the company data and use the user 
>> action on the default controller, so I can set 
>> registration_requires_verification = True and web2py automatically send 
>> this email?
>>
>> Thanks!
>>
>> Em quinta-feira, 27 de setembro de 2012 09h39min14s UTC-3, Massimo Di 
>> Pierro escreveu:
>>>
>>> auth.define_tables(username=False, signature=False)  
>>>
>>> auth.settings.registration_requires_verification = False ### <<< change 
>>> this to True
>>>
>>> On Wednesday, 26 September 2012 23:20:43 UTC-5, Bruno Codeman wrote:
>>>>
>>>> Hi!
>>>>
>>>> I'm creating a custom registration form (my registration form have more 
>>>> than one table on db) , but I need to ask the user to confirm by email the 
>>>> registration, clicking on a link. I would like to use the web2py native 
>>>> feature of sending the email and just let the user log in after click the 
>>>> confirmation link. There's any way to do it?
>>>>
>>>>
>>>> Sorry for my bad english, it's 1:20AM here in Brazil, normally it's a 
>>>> lil' bit better than this. :P
>>>>
>>>>
>>>> Thanks!
>>>>
>>>

-- 





[web2py] Re: Manually send confirmation email

2012-10-01 Thread Bruno Codeman
Thank you, howesec. Solved my problem! :D

Em quinta-feira, 27 de setembro de 2012 19h59min04s UTC-3, howesc escreveu:
>
> you may be able to use the onaccept handler of auth.register() to add 
> custom processing to auth without too much extra work.  you can add extra 
> fields to the auth form, and then do custom processing and let auth do the 
> rest of the work.
>
> On Thursday, September 27, 2012 6:24:15 AM UTC-7, Bruno Codeman wrote:
>>
>> Massimo, grazie per rispondere. Actually, I'm not using auth.register, I 
>> have a table called company, which is the "main entity" in the system. In 
>> my form, I have the data from both tables (the user must type the company 
>> data and the user data - email, name and password - in the same form), so I 
>> created a new controller and I'm saving the company data first, then I'm 
>> saving user data. Here's the code:
>>
>> empresa_has_errors = 
>> db.empresa._validate(**db.empresa._filter_fields(args)).items()
>> usuario_has_errors = 
>> db.usuario._validate(**db.usuario._filter_fields(args)).items()
>> if not empresa_has_errors and not usuario_has_errors:
>> id = db.empresa.insert(**db.empresa._filter_fields(args))
>> db.usuario.insert(email = args.email, nome_completo = args.nome_completo,
>>   empresa = id,telefone = args.telefone,
>>   password = db.usuario.password.validate(args.password)[0])
>> else:
>> return dict(empresa = empresa_has_errors, usuario = usuario_has_errors)
>>
>> I want to keep this user as inactive until it clicks on the link send by 
>> email. My questions:
>>
>> 1) Is there a way to do it with the auth email?
>>
>> 2) Should I create a custom form with the company data and use the user 
>> action on the default controller, so I can set 
>> registration_requires_verification = True and web2py automatically send 
>> this email?
>>
>> Thanks!
>>
>> Em quinta-feira, 27 de setembro de 2012 09h39min14s UTC-3, Massimo Di 
>> Pierro escreveu:
>>>
>>> auth.define_tables(username=False, signature=False)  
>>>
>>> auth.settings.registration_requires_verification = False ### <<< change 
>>> this to True
>>>
>>> On Wednesday, 26 September 2012 23:20:43 UTC-5, Bruno Codeman wrote:
>>>>
>>>> Hi!
>>>>
>>>> I'm creating a custom registration form (my registration form have more 
>>>> than one table on db) , but I need to ask the user to confirm by email the 
>>>> registration, clicking on a link. I would like to use the web2py native 
>>>> feature of sending the email and just let the user log in after click the 
>>>> confirmation link. There's any way to do it?
>>>>
>>>>
>>>> Sorry for my bad english, it's 1:20AM here in Brazil, normally it's a 
>>>> lil' bit better than this. :P
>>>>
>>>>
>>>> Thanks!
>>>>
>>>

-- 





[web2py] Re: Manually send confirmation email

2012-09-27 Thread Bruno Codeman
Massimo, grazie per rispondere. Actually, I'm not using auth.register, I 
have a table called company, which is the "main entity" in the system. In 
my form, I have the data from both tables (the user must type the company 
data and the user data - email, name and password - in the same form), so I 
created a new controller and I'm saving the company data first, then I'm 
saving user data. Here's the code:

empresa_has_errors = 
db.empresa._validate(**db.empresa._filter_fields(args)).items()
usuario_has_errors = 
db.usuario._validate(**db.usuario._filter_fields(args)).items()
if not empresa_has_errors and not usuario_has_errors:
id = db.empresa.insert(**db.empresa._filter_fields(args))
db.usuario.insert(email = args.email, nome_completo = args.nome_completo,
  empresa = id,telefone = args.telefone,
  password = db.usuario.password.validate(args.password)[0])
else:
return dict(empresa = empresa_has_errors, usuario = usuario_has_errors)

I want to keep this user as inactive until it clicks on the link send by 
email. My questions:

1) Is there a way to do it with the auth email?

2) Should I create a custom form with the company data and use the user 
action on the default controller, so I can set 
registration_requires_verification = True and web2py automatically send 
this email?

Thanks!

Em quinta-feira, 27 de setembro de 2012 09h39min14s UTC-3, Massimo Di 
Pierro escreveu:
>
> auth.define_tables(username=False, signature=False)
>  
> auth.settings.registration_requires_verification = False ### <<< change 
> this to True
>
> On Wednesday, 26 September 2012 23:20:43 UTC-5, Bruno Codeman wrote:
>>
>> Hi!
>>
>> I'm creating a custom registration form (my registration form have more 
>> than one table on db) , but I need to ask the user to confirm by email the 
>> registration, clicking on a link. I would like to use the web2py native 
>> feature of sending the email and just let the user log in after click the 
>> confirmation link. There's any way to do it?
>>
>>
>> Sorry for my bad english, it's 1:20AM here in Brazil, normally it's a 
>> lil' bit better than this. :P
>>
>>
>> Thanks!
>>
>

-- 





[web2py] Manually send confirmation email

2012-09-26 Thread Bruno Codeman
Hi!

I'm creating a custom registration form (my registration form have more 
than one table on db) , but I need to ask the user to confirm by email the 
registration, clicking on a link. I would like to use the web2py native 
feature of sending the email and just let the user log in after click the 
confirmation link. There's any way to do it?


Sorry for my bad english, it's 1:20AM here in Brazil.


Thanks!

-- 





Re: [web2py] Validate HTML Form

2012-09-24 Thread Bruno Codeman
thanks again, Bruno. You're always saving me, LoL.

Em segunda-feira, 24 de setembro de 2012 13h09min22s UTC-3, rochacbruno 
escreveu:
>
> On the processing action you can use 
> db.table.validate_and_insert(**fields), if validated the record will be 
> inserted, otherwise it will return the error message, if you do not want to 
> insert the values, so you can use table._validate method 
>  db.table._validate(**fields) will doo the same but nothing will be 
> inserted. 

-- 





[web2py] Validate HTML Form

2012-09-24 Thread Bruno Codeman

Hello everyone! I'm going back to web2py after one year developing with 
other technologies and saw a lot of good changes! Congrats Massimo and the 
dev team!

So, I would like to ask a question: I have a full HTML form, rendered by an 
action and processed by other action. There is a way to validate it like 
form.accept() on the processing action? This form create 2 records in 2 
different tables at the database (a company and an user for this company). 
I intend to use filter_fields to save this records after the validation.

Thanks!

-- 





[web2py] Re: CAS Auth redirect loop

2011-09-06 Thread Bruno Codeman
Any news about it?

On 31 ago, 18:08, Jay  wrote:
> The only comment I have is that there may be problem in the code at
> redirect. Raising an exception in redirect does not seem to work. I
> would look there.
> My $.02.
>
> Jay