Is there anything in the console ?

2016-09-12 3:46 GMT+02:00 <miaoxu99...@gmail.com>:

> def contact(request):
> error = []
> if request.method == 'POST':
> if not request.POST.get('subject', ''):
> error.append("please enter a subject")
> if not request.POST.get('message',''):
> error.append("please enter a message")
> if request.POST.get('email') and "@" not in request.POST["email"]:
> error.append("Please enter a valid e-mail")
> if not error:
> # send_mail(request.POST['subject'], request.POST['message'],
> request.POST.get('email', 'mxb...@126.com'), ['2229009...@qq.com'],
> fail_silently=True)
> send_mail('subject', 'this is the message of email', 'mxb...@126.com', ['
> 2229009...@qq.com'], fail_silently=True)
> return HttpResponseRedirect('/contact/thanks/')
> return render_to_response('contact.html', {'error' : error})
>
>
> STATIC_URL = '/static/'
>
> EMAIL_POST = 'smtp.126.com'
> EMAIL_PORT = 25
> EMAIL_HOST_USER = 'mxb...@126.com'
> EMAIL_HOST_PASSWORD = ''
> EMAIL_SUBJECT_PREFTX = u''
> EMAIL_USE_TLS = True
>
> SERVER_EMAIL = '2229009...@qq.com'
>
>
> error at /contact/
>
> [Errno 10061]
>
> Request Method: POST
> Request URL: http://127.0.0.1:8000/contact/
> Django Version: 1.10
> Exception Type: error
> Exception Value:
>
> [Errno 10061]
>
> Exception Location: D:\Python\lib\socket.py in create_connection, line 571
> Python Executable: D:\Python\python.exe
> Python Version: 2.7.3
> Python Path:
>
> ['C:\\Users\\miaoxu\\mysite',
>  'D:\\Python\\lib\\site-packages\\django-1.10-py2.7.egg',
>  'D:\\Python\\python27.zip',
>  'D:\\Python\\DLLs',
>  'D:\\Python\\lib',
>  'D:\\Python\\lib\\plat-win',
>  'D:\\Python\\lib\\lib-tk',
>  'D:\\Python',
>  'D:\\Python\\lib\\site-packages',
>  'D:\\Python\\lib\\site-packages\\PIL',
>  'D:\\Python\\lib\\site-packages\\win32',
>  'D:\\Python\\lib\\site-packages\\win32\\lib',
>  'D:\\Python\\lib\\site-packages\\Pythonwin']
>
> Server time: 星期一, 12 九月 2016 01:46:23 +0000
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/789f6303-87f6-4d20-9e1b-16fa8db0e943%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/789f6303-87f6-4d20-9e1b-16fa8db0e943%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZwGOZLLC1Zm_orVv5b8G0rn5pwdeeTL7nRn4%2BwNmtgNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to