On Tue, 2008-09-30 at 00:30 -0700, laspal wrote:
> 
> >>In other words, why can't you just call it directly as a Python function 
> >>and pass it the list of mail ids you want to send?
> 
> I tried returning the python function.

I didn't say *return* a Python function. I said *call* a Python
function.

[...]
> The problem here is I want my url to change
> step1 - >/contacts/
> step 2 -> /contacts/selectesmail/sendmail/


You are trying to do two steps at once: (1) sending the mail, (2)
returning the user to a particular view. Instead, carry out step (1) by
calling a function and then, after it returns, use an
HttpResponseRedirect to do step (2) and return them to whichever view
you like.

Don't mix up what your server-side code is trying to do with the what
the end-user sees in their browser. They presumably do not care how you
send the email. They only care that after submitting the form from URL
#1, then end up at URL #2.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to