hi
currently, i am using Django to create webpage, in view.py the code is in the following:
[code=python]
def contact(request ):
if request.method == 'POST':
form = ContactForm(req uest.POST)
if form.is_valid() :
# Do form processing here...
return HttpResponseRed irect('/on_success/')
else:
form = ContactForm()
return render_to_respo nse('contactus. html', {'form': form})
def success(request ):
return render_to_respo nse("on_success .html")
[/code]
in my form.py , it is like this:
[code=python]
class ContactForm(for ms.Form):
subject = forms.CharField (max_length=100 )
message = forms.CharField ()
sender = forms.EmailFiel d()
cc_myself = forms.BooleanFi eld(required=Fa lse)
[/code]
but i don not understand where is the Email is sent to as there is only sender's Email address, where to configure the receiver email address and how to configure the Mail server? i am very new to Django framework, just pick it up and learning in the process, can anyone help me to understand and smooth of application, thanks in advance :)
currently, i am using Django to create webpage, in view.py the code is in the following:
[code=python]
def contact(request ):
if request.method == 'POST':
form = ContactForm(req uest.POST)
if form.is_valid() :
# Do form processing here...
return HttpResponseRed irect('/on_success/')
else:
form = ContactForm()
return render_to_respo nse('contactus. html', {'form': form})
def success(request ):
return render_to_respo nse("on_success .html")
[/code]
in my form.py , it is like this:
[code=python]
class ContactForm(for ms.Form):
subject = forms.CharField (max_length=100 )
message = forms.CharField ()
sender = forms.EmailFiel d()
cc_myself = forms.BooleanFi eld(required=Fa lse)
[/code]
but i don not understand where is the Email is sent to as there is only sender's Email address, where to configure the receiver email address and how to configure the Mail server? i am very new to Django framework, just pick it up and learning in the process, can anyone help me to understand and smooth of application, thanks in advance :)
Comment