Continuing on the above...: I've reinstalled T3+T2, the behavior is the same. My t2 object remains alive for the duration of the web2py process/application -- a complete web2py restart is required to load my modified t2.py. Anyway -- I guess I can work around it. Maybe I'll script the startup/shutdown process...
Cheers, -Peter On Dec 15, 3:29 pm, Peter <peter.kleyn...@gmail.com> wrote: > Yarko, thanks. I'm doing this "only" for the registration/auth/authZ > functions in T2. > As such, I don't have strong preferences where the code is > located. ;-) > > I instantiate a t2 object at the bottom of my app's db.py: > from applications.plugin_t2.modules.t2 import T2 > t2=T2(request,response,session,cache,T,db) > > BUT once created, I have found out that this t2 object persists, even > through "stop server" + "start server"... > I have to fully exit and restart web2py if I want to reload t2.py with > any changes. If there is any way to kill+reload it, I'd like to know. > > Anyway, I will install T3 with T2 included and see if that goes any > better. I'll report back here. > > For the record, my current "howto" on user registration by email with > T2 is as follows: > - you /will/ probably need to edit t2.py; (ie, mail message contents, > error handling); > - if so, completely stop and restart web2py after each edit; > - in order for email reg to work, T2 assumes a working SMTP server on > localhost:25 > > Cheers, > -Peter > > On Dec 15, 12:57 am, "Yarko Tymciurak" <yark...@gmail.com> wrote: > > > Hi Peter - > > IF you are doing this for T3, then you should look at the include in > > applications/t2/models/db.py --- > > > plugins_t2 is "obsolete" now; t3 uses the t2 that appears in it's modules > > directory, so the include is really happening as > > > from applications.t3.modules.t2 import T2 > > > The code in t3/models/db.py says: > > exec('from applications.%s.modules.t2 import T2' % request.application) > > which does the same things.... > > > I'm not sure we couldn't (now) just have a top-level "modules" directory; > > does anyone see any reason we couldn't (if we wanted to) do something like: > > > from modules.t2 import T2 > > > ? > > > Let me know if this helps. > > Regards, > > Yarko > > > On Sun, Dec 14, 2008 at 4:23 PM, Peter <peter.kleyn...@gmail.com> wrote: > > > > I'm editing applications/plugin_t2/modules/t2.py, trying to find out > > > why my registration emails don't get out the door ("Unable to Send > > > Email", hmm). But it seems that despite my edits, the original t2 code > > > gets executed. Of course, I've deleted the t2.pyc I've found there. Is > > > there a trick to this? Should I clear a cache somewhere? > > > > Example: I've changed line #237 in t2.py from: > > > self.messages.unable_to_send_email="Unable to Send Email" > > > to self.messages.unable_to_send_email="Santa Claus is Coming" > > > -- and if I try to register, I still get the original flash message... > > > which might explain why the log.infos that I put in also come up > > > empty. > > > > Thanks in advance, > > > -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 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 -~----------~----~----~----~------~----~------~--~---