Django Urlopen Error Errno 111 Connection Refused
Contents |
here for a quick overview of the site Help Center Detailed answers errno 111 connection refused django send_mail to any questions you might have Meta Discuss the workings
Error Errno 111 Connection Refused Cloudera
and policies of this site About Us Learn more about Stack Overflow the company Business error errno 111 connection refused python Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Socket Error Errno 111 Connection Refused
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Django - [Errno 111] Connection refused up vote 32 down vote favorite 11 when I post a comment, do not save, crashes (error: errno 111 connection refused django [Errno 111] Connection refused), why? views.py import time from calendar import month_name from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404, render_to_response from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.core.urlresolvers import reverse from dbe.blog.models import * from django.forms import ModelForm class CommentForm(ModelForm): class Meta: model = Comment exclude = ["post"] def post(request, pk): post = Post.objects.get(pk=pk) comments = Comment.objects.filter(post=post) d = dict(post=post, comments=comments, form=CommentForm(), user=request.user) d.update(csrf(request)) return render_to_response("post.html", d) def delete_comment(request, post_pk, pk=None): if request.user.is_staff: if not pk: pklst = request.POST.getlist("delete") else: pklst = [pk] for pk in pklst: Comment.objects.get(pk=pk).delete() return HttpResponseRedirect(reverse("dbe.blog.views.post", args=[post_pk])) def add_comment(request, pk): p = request.POST if p.has_key("body") and p["body"]: author = "Anonymous" if p["author"]: author = p["author"] comment = Comment(post=Post.objects.get(pk=pk)) cf = CommentForm(p, instance=comment) cf.fields["author"].required = False comment = cf.save(commit=False) comment.author = author notify = True if request.user.username == "ak": notify = False comment.save(notify=notify) return HttpRespon
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the
Errno 111 Connection Refused Python
workings and policies of this site About Us Learn more about
Errno 111 Connection Refused Mongodb
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions django runserver connection refused Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. http://stackoverflow.com/questions/5802189/django-errno-111-connection-refused Join them; it only takes a minute: Sign up How can I debug what is causing a connection refused or a connection time out? up vote 15 down vote favorite 5 I have the following code that has worked for about a year: import urllib2 req = urllib2.Request('https://somewhere.com','
email/smtp] I am totally new at Django and while using its 'send_mail' function, I get this error: [Errno 111] Connection refused I think that's the issue with the firewall. deleted-user-18330 | 5 posts https://www.pythonanywhere.com/forums/topic/54/ | March 16, 2012, 5:48 a.m. | permalink Our firewall shouldn't block anything like that going out from PythonAnywhere. What do you have in the email server settings (like EMAIL_HOST and EMAIL_USE_TLS) in your settings.py? giles | 3502 posts | PythonAnywhere staff| | March 16, 2012, 11:21 a.m. | permalink settings.py doesn't have anything related to email. The default email host is set as 'localhost'.'EMAIL_USE_TLS' is set as 'false'. I connection refused am using: send_mail(data['subject'],data['message'],data['email'], ['myemail@**.com']) deleted-user-18330 | 5 posts | March 16, 2012, 12:52 p.m. | permalink Ah, right. We don't provide an SMTP server right now (it would make it too easy for spammers to use us), so you'll need to specify one in EMAIL_HOST. Do you have access to one that you can use? giles | 3502 posts | PythonAnywhere staff| | March 16, 2012, 1:33 p.m. | permalink Oh.I errno 111 connection will use my own. Thank you. deleted-user-18330 | 5 posts | March 16, 2012, 3:37 p.m. | permalink Hi I have the same problem, but I don't have access to an SMTP server -any suggestions appreciated. Preferably free :) I'd only need to send a very low volume deleted-user-24367 | 7 posts | March 30, 2012, 9:50 p.m. | permalink @signalstrength You can use Gmail's SMTP server. I searched for you and found: http://www.jangosmtp.com/Pricing.asp If you can provide convincing reason for mailing(testing?), I could share my SMTP server. deleted-user-18330 | 5 posts | March 31, 2012, 5:05 a.m. | permalink As Aatishnn said the easiest public SMTP server to use would probably be gmail's. You can configure it to accept emails from addresses other than your own. Good instructions are here: http://support.google.com/mail/bin/answer.py?hl=en&answer=22370 hansel | 459 posts | April 3, 2012, 9:35 a.m. | permalink @aatishnn ah great thanks I'll try Gmail. jangosmtp.com also looks interesting. I'd just be using it to experiment and for learning purposes, wouldn't ask to share anyone's for such things! Thanks again deleted-user-24367 | 7 posts | April 3, 2012, 10:17 a.m. | permalink @hansel thanks :) deleted-user-24367 | 7 posts | April 3, 2012, 10:24 a.m. | permalink Hi, I'm getting the same exception, I d