>>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.
View contact( request):
if request.method == 'POST':
return SendMail_Selected(request, new_mailing_list)
view SendMail_Selected(request, new_mailing_list):
mailing_list = new_mailing_list
if request.method == 'POST':
form = SendMailForm(request.POST)
if form.is_valid():
subject = form.cleaned_data['subject']
message = form.cleaned_data['message']
try:
send_mail(subject, message, sender, mailing_list)
request.user.message_set.create(message="Mail sent
successfully.")
return HttpResponseRedirect('../')
The problem here is I want my url to change
step1 - >/contacts/
step 2 -> /contacts/selectesmail/sendmail/
If I am passing python function as an return from my step 1 the url
does not changes and my form is already getting posted. I mean its
showing me field error as when I click send button in step 1.
how to solve this problem and most important is to change my url.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---