Re: [Zope] Problems with External Script
At 12:50 PM 1/30/02 -0500, you wrote:
The call must look like:
<dtml-var expr="myaffiliateprogram()"> or equivalently <dtml-var "myaffiliateprogram()">
Oh <:-) But it still throws the same error (tried both): Site Error An error was encountered while publishing this resource. Error Type: NameError Error Value: global name 'self' is not defined Troubleshooting Suggestions · This resource may be trying to reference a nonexistent object or variable global name 'self' is not defined. · The URL may be incorrect. · The parameters passed to this resource may be incorrect. · A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Again, here's the script: import string def myaffiliateprogram(): user_id, banner_id, page = self.REQUEST['user_id'],self.REQUEST['banner_id'],self.REQUEST['page'] redirect = "http://www.myaffiliateprogram.com/u/%(user_id)s/t.asp?id=%(banner_id)s&p=%(p..." % locals() print "Location: %(redirect)s\n" % locals() TIA, BenO
participants (1)
-
Ben Ocean