Is there a way, inside an external method, to *call* a DTML Method -- that is, to execute it? If so, how would I pass arguments to the DTML Method? Thanks... Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
From: "Bruce Eckel" <Bruce@EckelObjects.com>
Is there a way, inside an external method, to *call* a DTML Method -- that is, to execute it?
I guess so. You could get hold of the DTMLmethod object in question (maybe by passing it as a parameter to the External Method?) and then you do dtmlobject.__call__() If I remember correctly it will return the HTML code generated by the DTML-method.
If so, how would I pass arguments to the DTML Method?
Arguments? Do you mean form variables? This should work then: __call__(REQUEST={'variable1': 'jasådu', 'variable2': 'Här kommer, varsågod', 'variable3': 'Det är Fredriks fel.'}) ///Just guessing wildly....
Hi Bruce, Yes.. You'll need to pass in whatever namespaces needed to resolve references used by the DTML method, so you'll need to pass these into the external method (so that they can be forwarded to your DTML method). The DTML call signature is something like: theMethod( client, mapping, **kw) Probably the most frequently used pattern is just: result = theDTMLMethod(None, _) where "_" is the DTML namespace. but you can also pass an object in as a client, and add any "keyword" arguments you like, and they will also then resolve in the DTML method. hope that helps! -steve On Friday, November 23, 2001, at 01:25 PM, Bruce Eckel wrote:
Is there a way, inside an external method, to *call* a DTML Method -- that is, to execute it?
If so, how would I pass arguments to the DTML Method?
Thanks...
Maybe there's a better way to do this. How about this: can I use the Zope "MailHost" object from within an external method to send mail? I've looked at the MailHost source code but it's not obvious how I would make the calls. *********** REPLY SEPARATOR *********** On 11/23/01 at 10:25 AM Bruce Eckel wrote:
Is there a way, inside an external method, to *call* a DTML Method -- that is, to execute it?
If so, how would I pass arguments to the DTML Method?
Thanks...
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Hi, Bruce Eckel wrote:
Maybe there's a better way to do this.
How about this: can I use the Zope "MailHost" object from within an external method to send mail?
yes, the interface is described in the API Reference of the Zope Book: http://www.zope.org/Members/michel/ZB/AppendixB.dtml Use it like: subject = "E-Mail Subject" mto = "zope@zope.org" mfrom = "hohoff@rz.uni-potsdam.de" message = """To: zope@zope.org This is my E-Mail.""" self.NameOfMailHostObject.send(message, mto, mfrom, subject) ... Holger
Worked like a charm! It turns out I was handing it an invalid "from" email address. Which brings up another question -- is there a piece of code that will validate email addresses somewhere? Seems like it would be a common tool (I'll bet the spammers have it!). *********** REPLY SEPARATOR *********** On 11/24/01 at 11:10 AM Holger Hoffmann wrote:
Hi,
Bruce Eckel wrote:
Maybe there's a better way to do this.
How about this: can I use the Zope "MailHost" object from within
an
external method to send mail?
yes, the interface is described in the API Reference of the Zope Book:
http://www.zope.org/Members/michel/ZB/AppendixB.dtml
Use it like:
subject = "E-Mail Subject" mto = "zope@zope.org" mfrom = "hohoff@rz.uni-potsdam.de" message = """To: zope@zope.org
This is my E-Mail."""
self.NameOfMailHostObject.send(message, mto, mfrom, subject)
... Holger
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
"BE" == Bruce Eckel <Bruce@EckelObjects.com> writes:
BE> Worked like a charm! It turns out I was handing it an invalid BE> "from" email address. BE> Which brings up another question -- is there a piece of code BE> that will validate email addresses somewhere? Seems like it BE> would be a common tool (I'll bet the spammers have it!). Do you mean you want to find out if a string looks like a valid email address, or that it actually successfully delivers to some end destination? The former is doable, the latter is exceedingly difficult! Mailman has the following bit of code, which accomplishes the goal set out in its docstring <wink>: -------------------- snip snip -------------------- def ParseEmail(email): user = None domain = None email = email.lower() at_sign = email.find('@') if at_sign < 1: return email, None user = email[:at_sign] rest = email[at_sign+1:] domain = rest.split('.') return user, domain _badchars = re.compile('[][()<>|;^,/]') def ValidateEmail(s): """Verify that the an email address isn't grossly evil.""" # Pretty minimal, cheesy check. We could do better... if not s: raise Errors.MMBadEmailError if _badchars.search(s) or s[0] == '-': raise Errors.MMHostileAddress user, domain_parts = ParseEmail(s) # This means local, unqualified addresses, are no allowed if not domain_parts: raise Errors.MMBadEmailError if len(domain_parts) < 2: raise Errors.MMBadEmailError -------------------- snip snip -------------------- It seems to be fairly successful in keeping out really bad addresses. There are several things you can try to do to find out if the email address is undeliverable. Whether or not that actually reaches the intended individual and whether or not they actually read the message is a whole 'nutha story. First, you'd need to lookup the MX for the hostname part of the email address. Then you'd have to try each MX in the order of priority. Connect to port 25 for each machine and issue an EHLO command. See if the remote server supports the VRFY command. If so, you can try sending the address in a VRFY and see what response you get back. If you get an error back, it's possible <wink> that the email address isn't valid. It's probably a much greater possibility that VRFY isn't supported. So now you're left to attempting to deliver the message and waiting asynchronously for a bounce, and there you've got roughly two choices. You could route bounces to a mail robot that attempts to decipher the bazillion or so bounce formats dreamed up as cute by the mailer's authors (and remember one hacker's dream is another's nightmare), or you can attempt to encode the recipients address in the envelope sender address of the original delivery. This is called VERP (technically VERP-like if your app, and not your mailer does it), and can be pretty successful in unambiguously discovering bouncing addresses, but you need cooperation from your local mailer (the one receiving the bounce messages). All the above only helps you to find obviously bogus email addresses, and as you can guess there are tons of ways the above recipies can hide invalid addresses or unattended mailboxes. Trying to use headers like Return-Reciept-To: and friends really doesn't help, since they're just hints, not requirements (and who follows the specs anyway? Judging by email standards, not many ;). are-we-having-fun-yet?-ly y'rs, -Barry
Barry A. Warsaw wrote:
"BE" == Bruce Eckel <Bruce@EckelObjects.com> writes:
BE> Worked like a charm! It turns out I was handing it an invalid BE> "from" email address.
BE> Which brings up another question -- is there a piece of code BE> that will validate email addresses somewhere? Seems like it BE> would be a common tool (I'll bet the spammers have it!).
Do you mean you want to find out if a string looks like a valid email address, or that it actually successfully delivers to some end destination? The former is doable, the latter is exceedingly difficult!
Mailman has the following bit of code, which accomplishes the goal set out in its docstring <wink>:
I hadn't thought of looking through mailman. Here's one I put together a couple of weeks ago that seems a bit more thorough... -- Jim Washington # This is hacked from an existing script written in perl, licensed "public domain" # The original perl script: http://aspn.activestate.com/ASPN/Cookbook/Rx/Recipe/68432 2Nov2001 # author e-mail: tbyte@bolehmail.com """ Text of the perl script: sub ValidEmailAddr { #check if e-mail address format is valid my $mail = shift; #in form name@host return 0 if ( $mail !~ /^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$/ ); #characters allowed on name: 0-9a-Z-._ on host: 0-9a-Z-. on between: @ return 0 if ( $mail =~ /^[^0-9a-zA-Z]|[^0-9a-zA-Z]$/); #must start or end with alpha or num return 0 if ( $mail !~ /([0-9a-zA-Z]{1})\@./ ); #name must end with alpha or num return 0 if ( $mail !~ /.\@([0-9a-zA-Z]{1})/ ); #host must start with alpha or num return 0 if ( $mail =~ /.\.\-.|.\-\..|.\.\..|.\-\-./g ); #pair .- or -. or -- or .. not allowed return 0 if ( $mail =~ /.\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_./g ); #pair ._ or -_ or _. or _- or __ not allowed return 0 if ( $mail !~ /\.([a-zA-Z]{2,3})$/ ); #host must end with '.' plus 2 or 3 alpha for TopLevelDomain (MUST be modified in future!) return 1; } e-mail checker, checks whether an e-mail address is formatted properly. usage: from email_checker import valid_email s = "string to be tested" if valid_email(s): do_something() else: do something_else() """ import re rega = re.compile("^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$") #failure a regb = re.compile("^[^0-9a-zA-Z]|[^0-9a-zA-Z]$") #failure b regc = re.compile("([0-9a-zA-Z]{1})\@.") #failure c regd = re.compile(".\@([0-9a-zA-Z]{1})") #failure d rege = re.compile(".\.\-.|.\-\..|.\.\..|.\-\-.") #failure e regf = re.compile(".\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_.") #failure f regg = re.compile(".\.([a-zA-Z]{2,3})$|.\.([a-zA-Z]{2,4})$")#failure g def valid_email(address, debug=None): fail = None if rega.search(address) is None: fail = 'a' elif regb.search(address) is not None: fail = 'b' elif regc.search(address) is None: fail = 'c' elif regd.search(address) is None: fail = 'd' elif rege.search(address) is not None: fail = 'e' elif regf.search(address) is not None: fail = 'f' elif regg.search(address) is None: fail = 'g' if fail is not None: if debug: return address,fail,None else: return None if debug: return address,1,1 else: return 1 if __name__ == '__main__': #test a few: print valid_email('z+z.e@bun.org', debug=1) print valid_email('z.e@.org', debug=1) print valid_email('_az.e@bun.org', debug=1) print valid_email('e@b.g', debug=1) print valid_email('a_-.e@bun.org', debug=1) print valid_email('ok.computer@-bun.org', debug=1) print valid_email('ok.e@bun.org', debug=1) print valid_email('OK@bun.org', debug=1) print valid_email('t@bun.info', debug=1) print valid_email('my friend@bun.org', debug=1) print valid_email('my.friend.bun.org', debug=1)
Thanks! I spent a bit of time refactoring it. Also, I decided that if it worked it would return the address, otherwise it would return None to indicate failure. import re def ShouldBeNone(result): return result is not None def ShouldNotBeNone(result): return result is None tests = ( (re.compile("^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$"), ShouldNotBeNone, "Failed a"), (re.compile("^[^0-9a-zA-Z]|[^0-9a-zA-Z]$"), ShouldBeNone, "Failed b"), (re.compile("([0-9a-zA-Z]{1})\@."), ShouldNotBeNone, "Failed c"), (re.compile(".\@([0-9a-zA-Z]{1})"), ShouldNotBeNone, "Failed d"), (re.compile(".\.\-.|.\-\..|.\.\..|.\-\-."), ShouldBeNone, "Failed e"), (re.compile(".\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_."), ShouldBeNone, "Failed f"), (re.compile(".\.([a-zA-Z]{2,3})$|.\.([a-zA-Z]{2,4})$"), ShouldNotBeNone, "Failed g"), ) def valid_email(address, debug=None): for test in tests: if test[1](test[0].search(address)): if debug: return test[2] return None return address def tryAddress(address): print address, valid_email(address, debug=1) if __name__ == '__main__': #test a few: tryAddress('z+z.e@bun.org') tryAddress('z.e@.org') tryAddress('_az.e@bun.org') tryAddress('e@b.g') tryAddress('a_-.e@bun.org') tryAddress('ok.computer@-bun.org') tryAddress('ok.e@bun.org') tryAddress('OK@bun.org') tryAddress('t@bun.info') tryAddress('my friend@bun.org') tryAddress('my.friend.bun.org') *********** REPLY SEPARATOR *********** On 11/24/01 at 1:12 PM Jim Washington wrote:
Barry A. Warsaw wrote:
>"BE" == Bruce Eckel <Bruce@EckelObjects.com> writes: >
BE> Worked like a charm! It turns out I was handing it an invalid BE> "from" email address.
BE> Which brings up another question -- is there a piece of code BE> that will validate email addresses somewhere? Seems like it BE> would be a common tool (I'll bet the spammers have it!).
Do you mean you want to find out if a string looks like a valid email address, or that it actually successfully delivers to some end destination? The former is doable, the latter is exceedingly difficult!
Mailman has the following bit of code, which accomplishes the goal set out in its docstring <wink>:
I hadn't thought of looking through mailman. Here's one I put together a couple of weeks ago that seems a bit more thorough...
-- Jim Washington
# This is hacked from an existing script written in perl, licensed "public domain" # The original perl script: http://aspn.activestate.com/ASPN/Cookbook/Rx/Recipe/68432 2Nov2001 # author e-mail: tbyte@bolehmail.com
""" Text of the perl script:
sub ValidEmailAddr { #check if e-mail address format is valid
my $mail = shift; #in form name@host
return 0 if ( $mail !~ /^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$/ ); #characters allowed on name: 0-9a-Z-._ on host: 0-9a-Z-. on between: @ return 0 if ( $mail =~ /^[^0-9a-zA-Z]|[^0-9a-zA-Z]$/); #must start or end with alpha or num return 0 if ( $mail !~ /([0-9a-zA-Z]{1})\@./ ); #name must end with alpha or num return 0 if ( $mail !~ /.\@([0-9a-zA-Z]{1})/ ); #host must start with alpha or num return 0 if ( $mail =~ /.\.\-.|.\-\..|.\.\..|.\-\-./g ); #pair .- or -. or -- or .. not allowed return 0 if ( $mail =~ /.\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_./g ); #pair ._ or -_ or _. or _- or __ not allowed return 0 if ( $mail !~ /\.([a-zA-Z]{2,3})$/ ); #host must end with '.' plus 2 or 3 alpha for TopLevelDomain (MUST be modified in future!)
return 1; }
e-mail checker, checks whether an e-mail address is formatted properly. usage:
from email_checker import valid_email
s = "string to be tested" if valid_email(s): do_something() else: do something_else()
"""
import re
rega = re.compile("^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$") #failure a regb = re.compile("^[^0-9a-zA-Z]|[^0-9a-zA-Z]$") #failure b regc = re.compile("([0-9a-zA-Z]{1})\@.") #failure c regd = re.compile(".\@([0-9a-zA-Z]{1})") #failure d rege = re.compile(".\.\-.|.\-\..|.\.\..|.\-\-.") #failure e regf = re.compile(".\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_.") #failure f regg = re.compile(".\.([a-zA-Z]{2,3})$|.\.([a-zA-Z]{2,4})$")#failure g
def valid_email(address, debug=None): fail = None if rega.search(address) is None: fail = 'a' elif regb.search(address) is not None: fail = 'b' elif regc.search(address) is None: fail = 'c' elif regd.search(address) is None: fail = 'd' elif rege.search(address) is not None: fail = 'e' elif regf.search(address) is not None: fail = 'f' elif regg.search(address) is None: fail = 'g' if fail is not None: if debug: return address,fail,None else: return None if debug: return address,1,1 else: return 1
if __name__ == '__main__': #test a few: print valid_email('z+z.e@bun.org', debug=1) print valid_email('z.e@.org', debug=1) print valid_email('_az.e@bun.org', debug=1) print valid_email('e@b.g', debug=1) print valid_email('a_-.e@bun.org', debug=1) print valid_email('ok.computer@-bun.org', debug=1) print valid_email('ok.e@bun.org', debug=1) print valid_email('OK@bun.org', debug=1) print valid_email('t@bun.info', debug=1) print valid_email('my friend@bun.org', debug=1) print valid_email('my.friend.bun.org', debug=1)
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Bruce Eckel wrote:
Thanks! I spent a bit of time refactoring it. Also, I decided that if it worked it would return the address, otherwise it would return None to indicate failure.
[refactored code snipped] Interesting style! Thanks! Always good to learn a new thing or two. Do you plan to work on the other part about querying the SMTP server about whether it accepts mail for [email_address]? -- Jim Washington
Bruce Eckel wrote:
Thanks! I spent a bit of time refactoring it. Also, I decided that if it worked it would return the address, otherwise it would return None to indicate failure.
[refactored code snipped]
Interesting style! Thanks! Always good to learn a new thing or two. Do you plan to work on the other part about querying the SMTP server about whether it accepts mail for [email_address]?
-- Jim Washington
Actually, that part is relatively automatic: when you try to send an email it will throw various types of exceptions, and if there's something wrong with the sender name, you get a SMTPSenderRefused exception. So this code: try: self.MailHost.send("This is a test", 'Bruce@EckelObjects.com', form_data['email'], "%s\n\n" % form_data['seminar-id']) except smtplib.SMTPSenderRefused: get_transaction().abort() return "Invalid email address: please press your browser's 'back' key and correct it" (Or something fancier -- I've forgotten how to set up the return value so that it's HTML) will do the trick. Notice the get_transaction().abort() which Chris Withers told me about -- it causes the transaction to be rolled back, which would normally occur when an exception goes through, but since I'm catching the exception I have to do it myself. I'm not sure who is throwing the SMTPSenderRefused -- it may just be some code in the MailHost object that's checking the address, or it may be the mailer itself, in which case one could argue that the other code we've been bouncing around may not be necessary. Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Here's an update: "All SMTPSenderRefused is telling you is that Sendmail didn't like the sender's address, meaning it wasn't conformant to the relevant RFCs to be an Internet e-mail address. If you're just checking the formatting, it's about as good as you'll find anywhere. If you're looking for a valid delivery location, the only true test is to send it and not receive a bounce, which really only means that the other machine didn't tell you it was not valid." On Sun, Nov 25, 2001 at 08:52:13AM -0800, Bruce Eckel wrote:
Yes, the invalid sender was actually the problem, since that is the address that the registrant has filled out in the form. I'm trying to figure out now whether this test is reliable enough that I can ignore the other checks of the email address, or if I should do those on top of this.
So it appears from this that one could skip our format-checking code, and just catch SMTPSenderRefused as a test for the validity of the email address formatting. The value of this is that if the RFCs change, someone else would update the format-checking code (in sendmail). *********** REPLY SEPARATOR *********** On 11/25/01 at 8:28 AM Jim Washington wrote:
Bruce Eckel wrote:
Thanks! I spent a bit of time refactoring it. Also, I decided that if it worked it would return the address, otherwise it would return None to indicate failure.
[refactored code snipped]
Interesting style! Thanks! Always good to learn a new thing or two. Do you plan to work on the other part about querying the SMTP server about whether it accepts mail for [email_address]?
-- Jim Washington
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
I've successfully used in Python the ridiculous (6598 byte) regex to match email addresses that Jeffrey Friedl presents in "Mastering Regular Expressions". It's available as an example here: http://public.yahoo.com/~jfriedl/regex/code.html ----- Original Message ----- From: "Bruce Eckel" <Bruce@EckelObjects.com> To: <hohoff@rz.uni-potsdam.de>; <zope@zope.org> Cc: <ecofsky@theUNIXman.com>; <chrism@digicool.com> Sent: Saturday, November 24, 2001 10:48 AM Subject: Email address validator?
Worked like a charm! It turns out I was handing it an invalid "from" email address.
Which brings up another question -- is there a piece of code that will validate email addresses somewhere? Seems like it would be a common tool (I'll bet the spammers have it!).
*********** REPLY SEPARATOR ***********
On 11/24/01 at 11:10 AM Holger Hoffmann wrote:
Hi,
Bruce Eckel wrote:
Maybe there's a better way to do this.
How about this: can I use the Zope "MailHost" object from within
an
external method to send mail?
yes, the interface is described in the API Reference of the Zope Book:
http://www.zope.org/Members/michel/ZB/AppendixB.dtml
Use it like:
subject = "E-Mail Subject" mto = "zope@zope.org" mfrom = "hohoff@rz.uni-potsdam.de" message = """To: zope@zope.org
This is my E-Mail."""
self.NameOfMailHostObject.send(message, mto, mfrom, subject)
... Holger
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
How about this: can I use the Zope "MailHost" object from within an external method to send mail? I've looked at the MailHost source code but it's not obvious how I would make the calls.
mh.send("A long string that is the message", "foo@bar,com, bar@foo.com", "from_me@mydomain.com") Where mh is the MailHost object (you can get it from the context of your external script).
Yup... try this from inside an external method: return self.dtml_method_name(None, self.REQUEST, arg1='foo', arg2='bar') There are other ways to do this. This is a particularly Perlish corner of Zope, but the above usually works. ----- Original Message ----- From: "Bruce Eckel" <Bruce@EckelObjects.com> To: <zope@zope.org> Cc: <chrism@digicool.com> Sent: Friday, November 23, 2001 1:25 PM Subject: Calling a DTML Method from within an External Method
Is there a way, inside an external method, to *call* a DTML Method -- that is, to execute it?
If so, how would I pass arguments to the DTML Method?
Thanks...
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Chris McDonough writes:
Yup... try this from inside an external method:
return self.dtml_method_name(None, self.REQUEST, arg1='foo', arg2='bar') Usually, it is better to pass "self" instead on "None".
This will be necessary, when the DTML Method needs access to any Zope object (and not only REQUEST variables). Dieter
participants (9)
-
barry@zope.com -
Bruce Eckel -
Chris McDonough -
Dieter Maurer -
Holger Hoffmann -
Jim Washington -
Lennart Regebro -
Lennart Regebro -
Steve Spicklemire