I'm attempting to write a listener page which will take POST variables
sent from an external payment site to verify whether payment was
successful or not. Here is the view:
def results(request):
if request.method == 'POST':
test = request.POST.get('pmt_status')
subject = 'Jensen test values'
message = test + "\n"
emailto = '[email protected]' <--normally my real address
try:
mail = EmailMessage(subject, message,
'[email protected]',
[emailto])
mail.send()
return render_to_response('forms/jensen/thanks.html',
{'message':
'Sent email to %s'%emailto})
except:
return
render_to_response('forms/jensen/emailerror.html')
else:
return render_to_response('forms/jensen/error.html')
No matter what I do the else block is always processed. It never
detects the POST method from the external site. When I do this from
internal...it works great...not so with the external site. Is there
something special about processing POST from an external site?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.