>
> 1. In the db.py file, I filled email and smtp mail settings and enabled 
> 'require email confirmation for registration', but it says connection 
> refused when trying to register a user account. Is that because I am on 
> pythonanywhere free account OR did I miss some other configuration settings?
>

yes. python anywhere does not offer a smtp server on localost. You must 
login to gmail or other smtp server
 

> 2. I read that there was serious security flaw in oauth2 authentication. 
> Should I be worried if I used it for user login and registration for my 
> website. I am not asking about logging in with facebook or google, but the 
> login and registration auth that I get with web2py.
>

no. web2py only uses auth2 to delegate authentication to others. If you are 
not not explicitly using oauth2 you are fine.
 

> 3. Once I register a user, how would I implement user account deletion 
> along with the associated data? I want my users to be able to delete their 
> account and their data if they want to do so. But I couldn't find out how 
> to do so on web2py. Can someone advise on how to do it? Also I'd like to 
> know how to disable or deactivate a user's account.
>

@auth.requires_login() 
def delete_my_account():
     del db.auth_user[auth.user.id]
     return 'bye bye!'
 

>
> 4. After I define models, I can get {{=form}}. But how do I change button 
> to a different type in the form that I get as a result? Say I want 
> bootstrap 'btn-danger' just in one particular page (I'd like to use 
>  'btn-danger' as the form submit button in a page instead of what I get 
> when using {{=form}} in the view).
>

form.element('button',_type='submit')['_class'] = 'btn-danger'

or use a custom form in html.




> 5. If I want to use realtime chat in one of my web2py app, is it possible? 
> If so, can you point to some resource on how I can use tornado within 
> web2py?
>

yes. integration with tornado for chats and chat groups is already built in:

https://github.com/web2py/web2py/blob/master/gluon/contrib/websocket_messaging.py
 

-- 
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.

Reply via email to