On Jan 31, 7:33 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > Please try create a new empty app. > The scaffolding db.py module contains instructions for Mail, Auth, > Crud. > Please try it. report bug. send me comments. > Is this confusing? Is this helpful? Does it belong there or should it > only be in docs?
+1 for including this in the scaffolding (not just hiding away in the docs) I would go further & suggest a sample module which extends these classes to add T so that the strings can be localised. I have in my model: from applications.sahana.modules.sahana import * auth=AuthS3(globals(),T,db) In my module I have: class AuthS3(Auth): """Extended version of Auth from gluon/tools.py - Allow Internationalisation of strings (can't be done in gluon) """ def __init__(self,environment,T,db=None): "Initialise parent class & make any necessary modifications" Auth.__init__(self,environment,db) self.messages.logged_in=T("Logged in") self.messages.email_sent=T("Email sent") self.messages.email_verified=T("Email verified") self.messages.logged_out=T("Logged out") self.messages.registration_succesful=T("Registration successful") self.messages.invalid_email=T("Invalid email") self.messages.invalid_login=T("Invalid login") self.messages.verify_email_subject=T("Password verify") self.messages.username_sent=T("Your username was emailed to you") self.messages.new_password_sent=T("A new password was emailed to you") self.messages.invalid_email=T("Invalid email") self.messages.password_changed=T("Password changed") self.messages.retrieve_username=str(T("Your username is"))+": % (username)s" self.messages.retrieve_username_subject="Username retrieve" self.messages.retrieve_password=str(T("Your password is"))+": % (password)s" self.messages.retrieve_password_subject=T("Password retrieve") self.messages.profile_updated=T("Profile updated") This also means I can tweak any of the functionality I like & I think it's good to have this within the default sample to make this extensibility easier for newbies. The Internationalisation is a killer factor though. F --~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---