Estava fazendo a parte de passar dados de um perfil para a view e deu erro
from django.shortcuts import render
from django.http import HttpResponse
from perfis.models import Perfil
def index(request):
return render(request, 'index.html')
def exibir(request, perfil_id):
perfil = Perfil()
if perfil_id == '1':
print 'entoru no if'
perfil = Perfil('Elaynne', 'elaynne@email', '000', 'emp')
return render(request, 'perfil.html', { "perfil" : perfil })
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>ConnectedIn</title>
</head>
<body>
<h1>Detalhe Perfil</h1>
Nome: {{ perfil.nome }},
Email: {{ perfil.email }},
Telefone: {{ perfil.telefone }},
Empresa: {{ perfil.nome_empresa }}
</body>
</html>
Traceback (most recent call last):
File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
self.finish_response()
File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
self.write(data)
File "C:\Python27\lib\wsgiref\handlers.py", line 212, in write
self.send_headers()
File "C:\Python27\lib\wsgiref\handlers.py", line 270, in send_headers
self.send_preamble()
File "C:\Python27\lib\wsgiref\handlers.py", line 194, in send_preamble
'Date: %s\r\n' % format_date_time(time.time())
File "C:\Python27\lib\socket.py", line 324, in write
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] Uma conexÒo estabelecida foi anulada pelo software no computador host
[21/Feb/2019 16:19:18] "GET /favicon.ico HTTP/1.1" 500 59