Сама ошибка :
Exception happened during processing of request from ('127.0.0.1', 60348)
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 99, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "C:\Python27\lib\SocketServer.py", line 651, in __init__
self.finish()
File "C:\Python27\lib\SocketServer.py", line 710, in finish
self.wfile.close()
File "C:\Python27\lib\socket.py", line 279, in close
self.flush()
File "C:\Python27\lib\socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] ╧ЁюуЁрььр эр тр°хь їюёЄ-
Код:
from django.shortcuts import render,render_to_response
from django.http import JsonResponse,HttpResponse
# Create your views here.
def home(request):
return render_to_response('index.html')
def get_url(request):
url = request.GET[u'url']
return HttpResponse('Some text')
и
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', 'base.views.home', name="home"),
url(r'^get_url/$', 'base.views.get_url', name="get_url"),
]
$.get("http://localhost:8000/get_url/",{url:url_q},function(data){
console.log('data');
alert(data);
}
)
При этом ответа от сервера нет. И страница перезагружается.